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

Function checkInt

docs/app/js/sanddance-app.js:113711–113715  ·  view source on GitHub ↗
(buf, value, offset, ext, max, min)

Source from the content-addressed store, hash-verified

113709 return ieee754.read(this, offset, false, 52, 8);
113710};
113711function checkInt(buf, value, offset, ext, max, min) {
113712 if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
113713 if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
113714 if (offset + ext > buf.length) throw new RangeError("Index out of range");
113715}
113716Buffer.prototype.writeUintLE = Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength5, noAssert) {
113717 value = +value;
113718 offset = offset >>> 0;

Callers 1

sanddance-app.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected