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

Function getMaxNestedLevel

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

Source from the content-addressed store, hash-verified

21};
22
23export const getMaxNestedLevel = (obj: DataObject): number => {
24 let maxNestedLevel = 0;
25
26 for (const key in obj) {
27 if (typeof obj[key] === 'object') {
28 const nestedLevel = getMaxNestedLevel(obj[key] as DataObject) + 1;
29 maxNestedLevel = Math.max(maxNestedLevel, nestedLevel);
30 }
31 }
32
33 return maxNestedLevel;
34};

Callers 2

ThemeColorsTableFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…