mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Simplify isType modules.
This commit is contained in:
@@ -6,10 +6,6 @@ import isBuffer from './isBuffer.js';
|
||||
import isPrototype from './.internal/isPrototype.js';
|
||||
import isTypedArray from './isTypedArray.js';
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
const mapTag = '[object Map]';
|
||||
const setTag = '[object Set]';
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
|
||||
@@ -54,7 +50,7 @@ function isEmpty(value) {
|
||||
return !value.length;
|
||||
}
|
||||
const tag = getTag(value);
|
||||
if (tag == mapTag || tag == setTag) {
|
||||
if (tag == '[object Map]' || tag == '[object Set]') {
|
||||
return !value.size;
|
||||
}
|
||||
if (isPrototype(value)) {
|
||||
|
||||
Reference in New Issue
Block a user