MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / jsString

Function jsString

packages/plugins/mcp/src/sdk/codex-repl.ts:29–30  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

27 * a value containing one would end the statement early.
28 */
29export const jsString = (value: string): string =>
30 JSON.stringify(value).replaceAll("\u2028", "\\u2028").replaceAll("\u2029", "\\u2029");
31
32export const jsLiteral = (value: unknown): string =>
33 `JSON.parse(${JSON.stringify(JSON.stringify(value ?? null))

Callers 2

codex-repl.test.tsFile · 0.90
runtimePreambleFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected