3 A [ponyfill](https://ponyfill.com) for `Buffer.allocUnsafe`.
5 Works as Node.js: `v7.0.0` <br>
6 Works on Node.js: `v0.10.0`
11 npm install --save buffer-alloc-unsafe
17 const allocUnsafe = require('buffer-alloc-unsafe')
19 console.log(allocUnsafe(10))
20 //=> <Buffer 78 0c 80 03 01 00 00 00 05 00>
22 console.log(allocUnsafe(10))
23 //=> <Buffer 58 ed bf 5f ff 7f 00 00 01 00>
25 console.log(allocUnsafe(10))
26 //=> <Buffer 50 0c 80 03 01 00 00 00 0a 00>
29 //=> RangeError: "size" argument must not be negative
36 - `size` <Integer> The desired length of the new `Buffer`
38 Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must be
39 less than or equal to the value of `buffer.kMaxLength` and greater than or equal
40 to zero. Otherwise, a `RangeError` is thrown.
44 - [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc`
45 - [buffer-fill](https://github.com/LinusU/buffer-fill) A ponyfill for `Buffer.fill`
46 - [buffer-from](https://github.com/LinusU/buffer-from) A ponyfill for `Buffer.from`