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

Function valueAfterKey

src/resolution/frameworks/next-proxy.ts:154–156  ·  view source on GitHub ↗

The offset of a field's value, from the offset of its key.

(s: string, keyAt: number)

Source from the content-addressed store, hash-verified

152
153/** The offset of a field's value, from the offset of its key. */
154function valueAfterKey(s: string, keyAt: number): number {
155 return keyAt + (/^[A-Za-z_$][\w$]*\s*:\s*/.exec(s.slice(keyAt, keyAt + 128))?.[0].length ?? 0);
156}
157
158/** The offset of the comma that ends the array element at `at`, or of the array's end. */
159function afterElement(s: string, at: number, end: number): number {

Callers 2

readProxyMatcherFunction · 0.85
sourceEntryFunction · 0.85

Calls 1

execMethod · 0.65

Tested by

no test coverage detected