MCPcopy Create free account
hub / github.com/chhoumann/quickadd / readIdentifier

Function readIdentifier

src/utils/userScriptSecrets.ts:190–201  ·  view source on GitHub ↗
(
	source: string,
	index: number,
)

Source from the content-addressed store, hash-verified

188}
189
190function readIdentifier(
191 source: string,
192 index: number,
193): { value: string; end: number } | null {
194 const match = /^[A-Za-z_$][\w$]*/.exec(source.slice(index));
195 if (!match) return null;
196
197 return {
198 value: match[0],
199 end: index + match[0].length,
200 };
201}
202
203function findMatchingDelimiter(
204 source: string,

Callers 1

readOptionKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected