main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | import root from './_root.js';
|
---|
2 | import stubFalse from './stubFalse.js';
|
---|
3 |
|
---|
4 | /** Detect free variable `exports`. */
|
---|
5 | var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
---|
6 |
|
---|
7 | /** Detect free variable `module`. */
|
---|
8 | var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
---|
9 |
|
---|
10 | /** Detect the popular CommonJS extension `module.exports`. */
|
---|
11 | var moduleExports = freeModule && freeModule.exports === freeExports;
|
---|
12 |
|
---|
13 | /** Built-in value references. */
|
---|
14 | var Buffer = moduleExports ? root.Buffer : undefined;
|
---|
15 |
|
---|
16 | /* Built-in method references for those with the same name as other `lodash` methods. */
|
---|
17 | var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
---|
18 |
|
---|
19 | /**
|
---|
20 | * Checks if `value` is a buffer.
|
---|
21 | *
|
---|
22 | * @static
|
---|
23 | * @memberOf _
|
---|
24 | * @since 4.3.0
|
---|
25 | * @category Lang
|
---|
26 | * @param {*} value The value to check.
|
---|
27 | * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
---|
28 | * @example
|
---|
29 | *
|
---|
30 | * _.isBuffer(new Buffer(2));
|
---|
31 | * // => true
|
---|
32 | *
|
---|
33 | * _.isBuffer(new Uint8Array(2));
|
---|
34 | * // => false
|
---|
35 | */
|
---|
36 | var isBuffer = nativeIsBuffer || stubFalse;
|
---|
37 |
|
---|
38 | export default isBuffer;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.