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

Function opensString

src/resolution/frameworks/react.ts:2361–2364  ·  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

2359
2360/** True for a quote that opens a string or template, not an apostrophe in JSX text. */
2361function opensString(safe: string, i: number): boolean {
2362 const ch = safe[i];
2363 return ch === '`' || ((ch === '"' || ch === "'") && !/[\w$]/.test(safe[i - 1] ?? ''));
2364}
2365
2366function skipSpace(safe: string, i: number): number {
2367 while (/\s/.test(safe[i] ?? '')) i++;

Callers 2

ownReturnsFunction · 0.85
blockEndFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected