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

Function readIntBE

lib/internal/buffer.js:435–452  ·  view source on GitHub ↗
(offset, byteLength)

Source from the content-addressed store, hash-verified

433}
434
435function readIntBE(offset, byteLength) {
436 if (offset === undefined)
437 throw new ERR_INVALID_ARG_TYPE('offset', 'number', offset);
438 if (byteLength === 6)
439 return readInt48BE(this, offset);
440 if (byteLength === 5)
441 return readInt40BE(this, offset);
442 if (byteLength === 3)
443 return readInt24BE(this, offset);
444 if (byteLength === 4)
445 return readInt32BE(this, offset);
446 if (byteLength === 2)
447 return readInt16BE(this, offset);
448 if (byteLength === 1)
449 return readInt8(this, offset);
450
451 boundsError(byteLength, 6, 'byteLength');
452}
453
454function readInt48BE(buf, offset = 0) {
455 validateNumber(offset, 'offset');

Callers

nothing calls this directly

Calls 7

readInt48BEFunction · 0.85
readInt40BEFunction · 0.85
readInt24BEFunction · 0.85
readInt32BEFunction · 0.85
readInt16BEFunction · 0.85
readInt8Function · 0.85
boundsErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…