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

Function writeU_Int48LE

lib/internal/buffer.js:663–678  ·  view source on GitHub ↗
(buf, value, offset, min, max)

Source from the content-addressed store, hash-verified

661}
662
663function writeU_Int48LE(buf, value, offset, min, max) {
664 value = +value;
665 checkInt(value, min, max, buf, offset, 5);
666
667 const newVal = MathFloor(value * 2 ** -32);
668 buf[offset++] = value;
669 value = value >>> 8;
670 buf[offset++] = value;
671 value = value >>> 8;
672 buf[offset++] = value;
673 value = value >>> 8;
674 buf[offset++] = value;
675 buf[offset++] = newVal;
676 buf[offset++] = (newVal >>> 8);
677 return offset;
678}
679
680function writeU_Int40LE(buf, value, offset, min, max) {
681 value = +value;

Callers 2

writeUIntLEFunction · 0.85
writeIntLEFunction · 0.85

Calls 1

checkIntFunction · 0.85

Tested by

no test coverage detected