arr.inspect = BufferInspect
arr.toArrayBuffer = BufferToArrayBuffer
- // Private
arr._isBuffer = true
if (arr.byteLength !== 0)
* max The maximum value
*/
function verifuint (value, max) {
- assert.ok(typeof (value) == 'number',
- 'cannot write a non-number as a number')
-
+ assert.ok(typeof (value) == 'number', 'cannot write a non-number as a number')
assert.ok(value >= 0,
'specified a negative value for writing an unsigned value')
-
assert.ok(value <= max, 'value is larger than maximum value for type')
-
assert.ok(Math.floor(value) === value, 'value has a fractional component')
}
*/
function verifsint(value, max, min) {
assert.ok(typeof (value) == 'number', 'cannot write a non-number as a number')
-
assert.ok(value <= max, 'value larger than maximum allowed value')
-
assert.ok(value >= min, 'value smaller than minimum allowed value')
-
assert.ok(Math.floor(value) === value, 'value has a fractional component')
}
function verifIEEE754(value, max, min) {
assert.ok(typeof (value) == 'number', 'cannot write a non-number as a number')
-
assert.ok(value <= max, 'value larger than maximum allowed value')
-
assert.ok(value >= min, 'value smaller than minimum allowed value')
}