Function
checkInt
(buf, value, offset, ext, max, min)
Source from the content-addressed store, hash-verified
| 1545 | } |
| 1546 | |
| 1547 | function 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 | |
| 1553 | Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { |
| 1554 | value = +value |
Tested by
no test coverage detected