* Checks if `value` is an empty object, collection, map, or set. * * Objects are considered empty if they have no own enumerable string keyed * properties. * * Array-like values such as `arguments` objects, arrays, buffers, strings, or * jQuery-l
(value)
| 22103 | * // => false |
| 22104 | */ |
| 22105 | function isEmpty(value) { |
| 22106 | if (value == null) { |
| 22107 | return true; |
| 22108 | } |
| 22109 | if (isArrayLike(value) && |
| 22110 | (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || |
| 22111 | isBuffer(value) || isTypedArray(value) || isArguments(value))) { |
| 22112 | return !value.length; |
| 22113 | } |
| 22114 | var tag = getTag(value); |
| 22115 | if (tag == mapTag || tag == setTag) { |
| 22116 | return !value.size; |
| 22117 | } |
| 22118 | if (isPrototype(value)) { |
| 22119 | return !baseKeys(value).length; |
| 22120 | } |
| 22121 | for (var key in value) { |
| 22122 | if (hasOwnProperty.call(value, key)) { |
| 22123 | return false; |
| 22124 | } |
| 22125 | } |
| 22126 | return true; |
| 22127 | } |
| 22128 | |
| 22129 | /** |
| 22130 | * Performs a deep comparison between two values to determine if they are |
nothing calls this directly
no test coverage detected