MCPcopy Create free account
hub / github.com/microsoft/SandDance / checkInt

Function checkInt

docs/tests/v2/es6/js/sanddance.js:79627–79631  ·  view source on GitHub ↗
(buf, value, offset, ext, max, min)

Source from the content-addressed store, hash-verified

79625}
79626
79627function checkInt (buf, value, offset, ext, max, min) {
79628 if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
79629 if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
79630 if (offset + ext > buf.length) throw new RangeError('Index out of range')
79631}
79632
79633Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
79634 value = +value

Callers 1

sanddance.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected