MCPcopy Index your code
hub / github.com/angular/angular / quoteAndEscape

Method quoteAndEscape

packages/compiler/src/typecheck/ops/codegen.ts:30–34  ·  view source on GitHub ↗

Wraps a string value in quotes and escapes relevant characters.

(value: string)

Source from the content-addressed store, hash-verified

28
29 /** Wraps a string value in quotes and escapes relevant characters. */
30 static quoteAndEscape(value: string): string {
31 // Passing the value through `JSON.stringify` automatically
32 // escapes quotes and allows us to handle line breaks.
33 return JSON.stringify(value);
34 }
35
36 /**
37 * Converts the node's current state to a string.

Callers 9

visitLiteralMapMethod · 0.80
visitLiteralPrimitiveMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
translateInputFunction · 0.80
executeMethod · 0.80
executeMethod · 0.80
tcbCallTypeCtorFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected