MCPcopy Create free account
hub / github.com/ecomfe/tempad-dev / escapeJsSingleQuotedString

Function escapeJsSingleQuotedString

packages/extension/utils/string.ts:56–58  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

54}
55
56export function escapeJsSingleQuotedString(str: string) {
57 return str.replace(JS_SINGLE_QUOTE_ESCAPE_RE, (match) => JS_SINGLE_QUOTE_ESCAPES[match] ?? match)
58}
59
60export function escapeJsTemplateLiteralText(str: string) {
61 return str.replace(

Callers 2

stringifyValueFunction · 0.90
string.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected