MCPcopy Create free account
hub / github.com/bitpay/bitcore-message / checkInt

Function checkInt

bitcore-message.js:1547–1551  ·  view source on GitHub ↗
(buf, value, offset, ext, max, min)

Source from the content-addressed store, hash-verified

1545}
1546
1547function checkInt (buf, value, offset, ext, max, min) {
1548 if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
1549 if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
1550 if (offset + ext > buf.length) throw new RangeError('Index out of range')
1551}
1552
1553Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
1554 value = +value

Callers 1

bitcore-message.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected