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

Function size

lib/web/jshint.js:8484–8487  ·  view source on GitHub ↗

* Gets the size of `collection` by returning its length for array-like * values or the number of own enumerable properties for objects. * * @static * @memberOf _ * @category Collection * @param {Array|Object|string} collection The collection to inspect. * @returns

(collection)

Source from the content-addressed store, hash-verified

8482 * // => 7
8483 */
8484 function size(collection) {
8485 var length = collection ? getLength(collection) : 0;
8486 return isLength(length) ? length : keys(collection).length;
8487 }
8488
8489 /**
8490 * Checks if `predicate` returns truthy for **any** element of `collection`.

Callers 1

directArrayMethod · 0.85

Calls 1

isLengthFunction · 0.85

Tested by

no test coverage detected