MCPcopy
hub / github.com/jashkenas/underscore / keys

Function keys

underscore-node-f.cjs:281–289  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

279// Retrieve the names of an object's own properties.
280// Delegates to **ECMAScript 5**'s native `Object.keys`.
281function keys(obj) {
282 if (!isObject(obj)) return [];
283 if (nativeKeys) return nativeKeys(obj);
284 var keys = [];
285 for (var key in obj) if (has$1(obj, key)) keys.push(key);
286 // Ahem, IE < 9.
287 if (hasEnumBug) collectNonEnumProps(obj, keys);
288 return keys;
289}
290
291// Is a given array, string, or object empty?
292// An "empty" object has no enumerable own-properties.

Callers 15

isEmptyFunction · 0.70
isMatchFunction · 0.70
isEqualFunction · 0.70
valuesFunction · 0.70
pairsFunction · 0.70
invertFunction · 0.70
mapObjectFunction · 0.70
createEscaperFunction · 0.70
findKeyFunction · 0.70
eachFunction · 0.70
mapFunction · 0.70
reducerFunction · 0.70

Calls 3

isObjectFunction · 0.70
has$1Function · 0.70
collectNonEnumPropsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…