MCPcopy Create free account
hub / github.com/callstack/react-native-paper / traverseObject

Function traverseObject

docs/src/utils/themeColors.tsx:8–16  ·  view source on GitHub ↗
(obj: DataObject)

Source from the content-addressed store, hash-verified

6 const keys: string[] = [];
7
8 const traverseObject = (obj: DataObject) => {
9 for (const [key, value] of Object.entries(obj)) {
10 if (typeof value === 'object') {
11 traverseObject(value);
12 } else {
13 keys.push(key);
14 }
15 }
16 };
17
18 traverseObject(data);
19

Callers 1

getUniqueNestedKeysFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…