MCPcopy Index your code
hub / github.com/plotly/plotly.js / utf16leSlice

Function utf16leSlice

stackgl_modules/index.js:942–950  ·  view source on GitHub ↗
(buf, start, end)

Source from the content-addressed store, hash-verified

940 return out;
941}
942function utf16leSlice(buf, start, end) {
943 var bytes = buf.slice(start, end);
944 var res = '';
945 // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)
946 for (var i = 0; i < bytes.length - 1; i += 2) {
947 res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
948 }
949 return res;
950}
951Buffer.prototype.slice = function slice(start, end) {
952 var len = this.length;
953 start = ~~start;

Callers 1

slowToStringFunction · 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…