UNPKG

@feugene/mu

Version:

Helpful TS utilities without dependencies

24 lines 930 B
import root from '../internal/root.mjs'; /** Detect free variable `exports`. */ const freeExports = typeof exports === 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ const freeModule = freeExports && typeof module == 'object' && module && !('nodeType' in module) && 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. * * @example * * isBuffer(new Buffer(2)); * // => true * * isBuffer(new Uint8Array(2)); * // => false */ export default nativeIsBuffer || (() => false); //# sourceMappingURL=isBuffer.mjs.map