MCPcopy Index your code
hub / github.com/TanStack/ai / q

Function q

packages/ai-sandbox/src/git-exec.ts:24–26  ·  view source on GitHub ↗

POSIX single-quote escape: wrap in '…' and escape embedded quotes.

(value: string)

Source from the content-addressed store, hash-verified

22
23/** POSIX single-quote escape: wrap in '…' and escape embedded quotes. */
24function q(value: string): string {
25 return `'${value.replace(/'/g, `'\\''`)}'`
26}
27
28/** Reject values that could be parsed as a git flag when used as a positional. */
29function assertNoLeadingDash(value: string, name: string): void {

Callers 2

atFunction · 0.70
createExecBackedGitFunction · 0.70

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected