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

Function readInt32LE

lib/internal/buffer.js:391–402  ·  view source on GitHub ↗
(buf, offset = 0)

Source from the content-addressed store, hash-verified

389}
390
391function readInt32LE(buf, offset = 0) {
392 validateNumber(offset, 'offset');
393 const first = buf[offset];
394 const last = buf[offset + 3];
395 if (first === undefined || last === undefined)
396 boundsError(offset, buf.length - 4);
397
398 return first +
399 buf[++offset] * 2 ** 8 +
400 buf[++offset] * 2 ** 16 +
401 (last << 24); // Overflow
402}
403
404function readInt24LE(buf, offset = 0) {
405 validateNumber(offset, 'offset');

Callers 2

readIntLEFunction · 0.85

Calls 1

boundsErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…