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

Function writeU_Int40BE

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

Source from the content-addressed store, hash-verified

789}
790
791function writeU_Int40BE(buf, value, offset, min, max) {
792 value = +value;
793 checkInt(value, min, max, buf, offset, 4);
794
795 buf[offset++] = MathFloor(value * 2 ** -32);
796 buf[offset + 3] = value;
797 value = value >>> 8;
798 buf[offset + 2] = value;
799 value = value >>> 8;
800 buf[offset + 1] = value;
801 value = value >>> 8;
802 buf[offset] = value;
803 return offset + 4;
804}
805
806function writeU_Int32BE(buf, value, offset, min, max) {
807 value = +value;

Callers 2

writeUIntBEFunction · 0.85
writeIntBEFunction · 0.85

Calls 1

checkIntFunction · 0.85

Tested by

no test coverage detected