MCPcopy
hub / github.com/stemkoski/stemkoski.github.com / isEmpty

Function isEmpty

MathBox/mathbox-bundle.js:37419–37435  ·  view source on GitHub ↗

* Checks if `value` is empty. Arrays, strings, or `arguments` objects with a * length of `0` and objects with no own enumerable properties are considered * "empty". * * @static * @memberOf _ * @category Objects * @param {Array|Object|string} value The value to insp

(value)

Source from the content-addressed store, hash-verified

37417 * // => true
37418 */
37419 function isEmpty(value) {
37420 var result = true;
37421 if (!value) {
37422 return result;
37423 }
37424 var className = toString.call(value),
37425 length = value.length;
37426
37427 if ((className == arrayClass || className == stringClass || className == argsClass ) ||
37428 (className == objectClass && typeof length == 'number' && isFunction(value.splice))) {
37429 return !length;
37430 }
37431 forOwn(value, function() {
37432 return (result = false);
37433 });
37434 return result;
37435 }
37436
37437 /**
37438 * Performs a deep comparison between two values to determine if they are

Callers

nothing calls this directly

Calls 2

forOwnFunction · 0.85
isFunctionFunction · 0.70

Tested by

no test coverage detected