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

Function opensString

src/resolution/frameworks/react.ts:2383–2386  ·  view source on GitHub ↗

True for a quote that opens a string or template, not an apostrophe in JSX text.

(safe: string, i: number)

Source from the content-addressed store, hash-verified

2381
2382/** True for a quote that opens a string or template, not an apostrophe in JSX text. */
2383function opensString(safe: string, i: number): boolean {
2384 const ch = safe[i];
2385 return ch === '`' || ((ch === '"' || ch === "'") && !/[\w$]/.test(safe[i - 1] ?? ''));
2386}
2387
2388function skipSpace(safe: string, i: number): number {
2389 while (/\s/.test(safe[i] ?? '')) i++;

Callers 2

ownReturnsFunction · 0.85
blockEndFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected