MCPcopy Index your code
hub / github.com/nodejs/node / templateEscape

Function templateEscape

lib/internal/test_runner/snapshot.js:301–307  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

299}
300
301function templateEscape(str) {
302 let result = String(str);
303 result = StringPrototypeReplaceAll(result, '\\', '\\\\');
304 result = StringPrototypeReplaceAll(result, '`', '\\`');
305 result = StringPrototypeReplaceAll(result, '${', '\\${');
306 return result;
307}
308
309module.exports = {
310 SnapshotManager,

Callers 2

readFileMethod · 0.85
serializeMethod · 0.85

Calls 1

StringClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…