MCPcopy Create free account
hub / github.com/nodejs/node / encodeWtf16LE

Function encodeWtf16LE

deps/v8/test/mjsunit/wasm/stringrefs-exec-gc.js:240–249  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

238})();
239
240function encodeWtf16LE(str) {
241 // String iterator coalesces surrogate pairs.
242 let out = [];
243 for (let i = 0; i < str.length; i++) {
244 codeunit = str.charCodeAt(i);
245 out.push(codeunit & 0xff)
246 out.push(codeunit >> 8);
247 }
248 return out;
249}
250
251function makeWtf16TestDataSegment(strings) {
252 let data = []

Callers 2

makeWtf16TestDataSegmentFunction · 0.70

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected