MCPcopy Index your code
hub / github.com/jashkenas/underscore / keys

Function keys

underscore.js:288–296  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

286 // Retrieve the names of an object's own properties.
287 // Delegates to **ECMAScript 5**'s native `Object.keys`.
288 function keys(obj) {
289 if (!isObject(obj)) return [];
290 if (nativeKeys) return nativeKeys(obj);
291 var keys = [];
292 for (var key in obj) if (has$1(obj, key)) keys.push(key);
293 // Ahem, IE < 9.
294 if (hasEnumBug) collectNonEnumProps(obj, keys);
295 return keys;
296 }
297
298 // Is a given array, string, or object empty?
299 // 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…