MCPcopy Index your code
hub / github.com/glideapps/quicktype / forEachArrayInNestedValueArray

Function forEachArrayInNestedValueArray

src/Inference.ts:18–29  ·  view source on GitHub ↗
(va: NestedValueArray, f: (va: Value[]) => void)

Source from the content-addressed store, hash-verified

16type NestedValueArray = any;
17
18function forEachArrayInNestedValueArray(va: NestedValueArray, f: (va: Value[]) => void): void {
19 if (va.length === 0) {
20 return;
21 }
22 if (Array.isArray(va[0])) {
23 for (const x of va) {
24 forEachArrayInNestedValueArray(x, f);
25 }
26 } else {
27 f(va);
28 }
29}
30
31function forEachValueInNestedValueArray(va: NestedValueArray, f: (v: Value) => void): void {
32 forEachArrayInNestedValueArray(va, a => a.forEach(f));

Callers 2

TypeInferenceClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…