MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / isEmpty

Function isEmpty

lib/web/jshint.js:9994–10004  ·  view source on GitHub ↗

* Checks if `value` is empty. A value is considered empty unless it is an * `arguments` object, array, string, or jQuery-like collection with a length * greater than `0` or an object with own enumerable properties. * * @static * @memberOf _ * @category Lang * @para

(value)

Source from the content-addressed store, hash-verified

9992 * // => false
9993 */
9994 function isEmpty(value) {
9995 if (value == null) {
9996 return true;
9997 }
9998 var length = getLength(value);
9999 if (isLength(length) && (isArray(value) || isString(value) || isArguments(value) ||
10000 (isObjectLike(value) && isFunction(value.splice)))) {
10001 return !length;
10002 }
10003 return !keys(value).length;
10004 }
10005
10006 /**
10007 * Performs a deep comparison between two values to determine if they are

Callers

nothing calls this directly

Calls 6

isLengthFunction · 0.85
isStringFunction · 0.85
isArgumentsFunction · 0.85
isObjectLikeFunction · 0.85
isArrayFunction · 0.70
isFunctionFunction · 0.70

Tested by

no test coverage detected