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

Function addQuotes

lib/internal/util/inspect.js:770–778  ·  view source on GitHub ↗
(str, quotes)

Source from the content-addressed store, hash-verified

768}
769
770function addQuotes(str, quotes) {
771 if (quotes === -1) {
772 return `"${str}"`;
773 }
774 if (quotes === -2) {
775 return `\`${str}\``;
776 }
777 return `'${str}'`;
778}
779
780function escapeFn(str) {
781 const charCode = StringPrototypeCharCodeAt(str);

Callers 1

strEscapeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…