mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
Simplify _.isBuffer.
This commit is contained in:
@@ -1343,6 +1343,7 @@
|
||||
nativeFloor = Math.floor,
|
||||
nativeGetPrototype = Object.getPrototypeOf,
|
||||
nativeGetSymbols = Object.getOwnPropertySymbols,
|
||||
nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
|
||||
nativeIsFinite = context.isFinite,
|
||||
nativeJoin = arrayProto.join,
|
||||
nativeKeys = Object.keys,
|
||||
@@ -10724,9 +10725,7 @@
|
||||
* _.isBuffer(new Uint8Array(2));
|
||||
* // => false
|
||||
*/
|
||||
var isBuffer = !Buffer ? stubFalse : function(value) {
|
||||
return value instanceof Buffer;
|
||||
};
|
||||
var isBuffer = nativeIsBuffer || stubFalse;
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Date` object.
|
||||
|
||||
Reference in New Issue
Block a user