MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / skipValue

Function skipValue

src/resolution/frameworks/react.ts:398–408  ·  view source on GitHub ↗
(j: number)

Source from the content-addressed store, hash-verified

396 return j + 1;
397 };
398 const skipValue = (j: number): number => {
399 let depth = 0;
400 for (; j < text.length; j++) {
401 const ch = text[j]!;
402 if (ch === '"' || ch === "'" || ch === '`') { j = skipString(j) - 1; continue; }
403 if (ch === '{' || ch === '[' || ch === '(') depth++;
404 else if (ch === '}' || ch === ']' || ch === ')') { if (depth === 0) return j; depth--; }
405 else if (ch === ',' && depth === 0) return j;
406 }
407 return j;
408 };
409 let i = at + 1;
410 while (i < text.length) {
411 const m = /^\s*(?:([A-Za-z_$][\w$]*)|["']([^"']+)["'])\s*:\s*/.exec(text.slice(i));

Callers 2

readObjectValueFunction · 0.85
readObjectPathFunction · 0.85

Calls 1

skipStringFunction · 0.90

Tested by

no test coverage detected