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

Function writeIntLE

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

Source from the content-addressed store, hash-verified

847}
848
849function writeIntLE(value, offset, byteLength) {
850 if (byteLength === 6)
851 return writeU_Int48LE(this, value, offset, -0x800000000000, 0x7fffffffffff);
852 if (byteLength === 5)
853 return writeU_Int40LE(this, value, offset, -0x8000000000, 0x7fffffffff);
854 if (byteLength === 3)
855 return writeU_Int24LE(this, value, offset, -0x800000, 0x7fffff);
856 if (byteLength === 4)
857 return writeU_Int32LE(this, value, offset, -0x80000000, 0x7fffffff);
858 if (byteLength === 2)
859 return writeU_Int16LE(this, value, offset, -0x8000, 0x7fff);
860 if (byteLength === 1)
861 return writeU_Int8(this, value, offset, -0x80, 0x7f);
862
863 boundsError(byteLength, 6, 'byteLength');
864}
865
866function writeInt32LE(value, offset = 0) {
867 return writeU_Int32LE(this, value, offset, -0x80000000, 0x7fffffff);

Callers

nothing calls this directly

Calls 7

writeU_Int48LEFunction · 0.85
writeU_Int40LEFunction · 0.85
writeU_Int24LEFunction · 0.85
writeU_Int32LEFunction · 0.85
writeU_Int16LEFunction · 0.85
writeU_Int8Function · 0.85
boundsErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…