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

Function unicodeEscape

test/parallel/test-string-decoder.js:253–259  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

251
252// unicodeEscape prints the str contents as unicode escape codes.
253function unicodeEscape(str) {
254 let r = '';
255 for (let i = 0; i < str.length; i++) {
256 r += `\\u${str.charCodeAt(i).toString(16)}`;
257 }
258 return r;
259}
260
261// writeSequences returns an array of arrays that describes all possible ways a
262// buffer of the given length could be split up and passed to sequential write

Callers 1

testFunction · 0.85

Calls 1

toStringMethod · 0.45

Tested by 1

testFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…