COLLECTED BY
Organization:
Internet Archive
Focused crawls are collections of frequently-updated webcrawl data from narrow (as opposed to broad or wide) web crawls, often focused on a single domain or subdomain.
The Wayback Machine - https://web.archive.org/web/20201220221340/https://github.com/lodash/lodash/blob/master/isBuffer.js
Permalink
35 lines (28 sloc)
1.05 KB
import root from './.internal/root.js'
/** Detect free variable `exports`. */
const freeExports = typeof exports === 'object' && exports !== null && !exports . nodeType && exports
/** Detect free variable `module`. */
const freeModule = freeExports && typeof module === 'object' && module !== null && !module . nodeType && module
/** Detect the popular CommonJS extension `module.exports`. */
const moduleExports = freeModule && freeModule . exports === freeExports
/** Built-in value references. */
const Buffer = moduleExports ? root . Buffer : undefined
/* Built-in method references for those with the same name as other `lodash` methods. */
const nativeIsBuffer = Buffer ? Buffer . isBuffer : undefined
/**
* Checks if `value` is a buffer.
*
* @since 4.3.0
* @category Lang
* @param {* } value The value to check.
* @returns {boolean } Returns `true` if `value` is a buffer, else `false`.
* @example
*
* isBuffer(new Buffer(2))
* // => true
*
* isBuffer(new Uint8Array(2))
* // => false
*/
const isBuffer = nativeIsBuffer || ( ( ) => false )
export default isBuffer
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.