function fromArrayBuffer (array, byteOffset, length) {
if (byteOffset < 0 || array.byteLength < byteOffset) {
- throw new RangeError('\'offset\' is out of bounds')
+ throw new RangeError('"offset" is outside of buffer bounds')
}
if (array.byteLength < byteOffset + (length || 0)) {
assert.doesNotThrow(() => Buffer.from('abc'));
}
-/*
+
// Test that ParseArrayIndex handles full uint32
{
var errMsg = common.expectsError({
});
assert.throws(() => Buffer.from(new ArrayBuffer(0), -1 >>> 0), errMsg);
}
-
+/*
// ParseArrayIndex() should reject values that don't fit in a 32 bits size_t.
common.expectsError(() => {
var a = Buffer.alloc(1);