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

Function checkBounds

lib/internal/buffer.js:58–62  ·  view source on GitHub ↗
(buf, offset, byteLength)

Source from the content-addressed store, hash-verified

56const bigEndian = uInt8Float32Array[3] === 0;
57
58function checkBounds(buf, offset, byteLength) {
59 validateNumber(offset, 'offset');
60 if (buf[offset] === undefined || buf[offset + byteLength] === undefined)
61 boundsError(offset, buf.length - (byteLength + 1));
62}
63
64function checkInt(value, min, max, buf, offset, byteLength) {
65 if (value > max || value < min) {

Callers 5

checkIntFunction · 0.85
writeDoubleForwardsFunction · 0.85
writeDoubleBackwardsFunction · 0.85
writeFloatForwardsFunction · 0.85
writeFloatBackwardsFunction · 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…