MCPcopy Index your code
hub / github.com/Starcounter-Jack/JSON-Patch / _objectKeys

Function _objectKeys

module/helpers.mjs:23–41  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

21 return _hasOwnProperty.call(obj, key);
22}
23export function _objectKeys(obj) {
24 if (Array.isArray(obj)) {
25 var keys_1 = new Array(obj.length);
26 for (var k = 0; k < keys_1.length; k++) {
27 keys_1[k] = "" + k;
28 }
29 return keys_1;
30 }
31 if (Object.keys) {
32 return Object.keys(obj);
33 }
34 var keys = [];
35 for (var i in obj) {
36 if (hasOwnProperty(obj, i)) {
37 keys.push(i);
38 }
39 }
40 return keys;
41}
42;
43/**
44* Deeply clone the object.

Callers 3

_generateFunction · 0.90
_generateFunction · 0.90
hasUndefinedFunction · 0.70

Calls 1

hasOwnPropertyFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…