(length)
| 76 | }) |
| 77 | |
| 78 | function createBuffer (length) { |
| 79 | if (length > K_MAX_LENGTH) { |
| 80 | throw new RangeError('The value "' + length + '" is invalid for option "size"') |
| 81 | } |
| 82 | // Return an augmented `Uint8Array` instance |
| 83 | const buf = new Uint8Array(length) |
| 84 | Object.setPrototypeOf(buf, Buffer.prototype) |
| 85 | return buf |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * The Buffer constructor returns instances of `Uint8Array` that have their |
no outgoing calls
no test coverage detected
searching dependent graphs…