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

Function bind

src/resolution/frameworks/react.ts:1416–1423  ·  view source on GitHub ↗
(pattern: string)

Source from the content-addressed store, hash-verified

1414 const rest = new Set<string>();
1415 const paths = new Set<string>();
1416 const bind = (pattern: string): void => {
1417 for (const entry of topLevelEntries(pattern.slice(1, -1))) {
1418 const spread = /^\.\.\.\s*([A-Za-z_$][\w$]*)$/.exec(entry);
1419 if (spread) rest.add(spread[1]!);
1420 const path = /^path\s*(?::\s*([A-Za-z_$][\w$]*))?\s*(?:=[\s\S]*)?$/.exec(entry);
1421 if (path) paths.add(path[1] ?? 'path');
1422 }
1423 };
1424 if (head) {
1425 const at = head[0].length;
1426 if (callback[at] === '{') {

Callers 1

mapsRouteFieldsFunction · 0.70

Calls 3

topLevelEntriesFunction · 0.85
execMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected