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

Function writeIntBE

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

Source from the content-addressed store, hash-verified

876}
877
878function writeIntBE(value, offset, byteLength) {
879 if (byteLength === 6)
880 return writeU_Int48BE(this, value, offset, -0x800000000000, 0x7fffffffffff);
881 if (byteLength === 5)
882 return writeU_Int40BE(this, value, offset, -0x8000000000, 0x7fffffffff);
883 if (byteLength === 3)
884 return writeU_Int24BE(this, value, offset, -0x800000, 0x7fffff);
885 if (byteLength === 4)
886 return writeU_Int32BE(this, value, offset, -0x80000000, 0x7fffffff);
887 if (byteLength === 2)
888 return writeU_Int16BE(this, value, offset, -0x8000, 0x7fff);
889 if (byteLength === 1)
890 return writeU_Int8(this, value, offset, -0x80, 0x7f);
891
892 boundsError(byteLength, 6, 'byteLength');
893}
894
895function writeInt32BE(value, offset = 0) {
896 return writeU_Int32BE(this, value, offset, -0x80000000, 0x7fffffff);

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