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

Function writeUIntBE

lib/internal/buffer.js:757–772  ·  view source on GitHub ↗
(value, offset, byteLength)

Source from the content-addressed store, hash-verified

755}
756
757function writeUIntBE(value, offset, byteLength) {
758 if (byteLength === 6)
759 return writeU_Int48BE(this, value, offset, 0, 0xffffffffffff);
760 if (byteLength === 5)
761 return writeU_Int40BE(this, value, offset, 0, 0xffffffffff);
762 if (byteLength === 3)
763 return writeU_Int24BE(this, value, offset, 0, 0xffffff);
764 if (byteLength === 4)
765 return writeU_Int32BE(this, value, offset, 0, 0xffffffff);
766 if (byteLength === 2)
767 return writeU_Int16BE(this, value, offset, 0, 0xffff);
768 if (byteLength === 1)
769 return writeU_Int8(this, value, offset, 0, 0xff);
770
771 boundsError(byteLength, 6, 'byteLength');
772}
773
774function writeU_Int48BE(buf, value, offset, min, max) {
775 value = +value;

Callers

nothing calls this directly

Calls 7

writeU_Int48BEFunction · 0.85
writeU_Int40BEFunction · 0.85
writeU_Int24BEFunction · 0.85
writeU_Int32BEFunction · 0.85
writeU_Int16BEFunction · 0.85
writeU_Int8Function · 0.85
boundsErrorFunction · 0.85

Tested by

no test coverage detected