{"name":"buffer-alloc","version":"0.1.0","license":"MIT","repository":{"type":"git","url":"git+https://github.com/linusu/buffer-alloc.git"},"scripts":{"test":"standard && node test"},"devDependencies":{"standard":"^7.1.2"},"engineStrict":true,"engines":{"node":">= 0.12"},"keywords":["alloc","allocate","buffer alloc","buffer allocate","buffer"],"gitHead":"1750b115b78c1a6a9385ba35dc74949baeee7d2f","description":"A ponyfill for `Buffer.alloc`, uses native implementation if available.","bugs":{"url":"https://github.com/linusu/buffer-alloc/issues"},"homepage":"https://github.com/linusu/buffer-alloc#readme","_id":"buffer-alloc@0.1.0","_shasum":"e3cb6a1c2a44b3e27a275f8213dfd0c5d43ca8d6","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"linusu","email":"linus@folkdatorn.se"},"dist":{"shasum":"e3cb6a1c2a44b3e27a275f8213dfd0c5d43ca8d6","tarball":"http://registry-npm.ywwl.com/buffer-alloc/download/buffer-alloc-0.1.0.tgz","integrity":"sha512-B77EJB1Ov4yr7AMmG0v65LFYkYaTyg6sju3oGNlUySC7+sVkECsATyfSFZYrObWnZ10ftL7BPw/6EnkjFDzkYA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXjbqWR9ldeRGRCUgfCQlZqRw1zymK9GZUBoC2Y9kwRQIhAKh6RMG6Cfhsj+l8m4zw7IRH867SE2/ndpIsRI/CnbR3"}],"size":1297,"noattachment":false,"key":"/buffer-alloc/-/buffer-alloc-0.1.0.tgz"},"maintainers":[{"name":"linusu","email":"linus@folkdatorn.se"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/buffer-alloc-0.1.0.tgz_1471550011281_0.8142221465241164"},"directories":{},"readme":"# Buffer Alloc\n\nA [ponyfill](https://ponyfill.com) for `Buffer.alloc`.\n\nWorks as Node.js: `v7.0.0` <br>\nWorks on Node.js: `v0.10.0`\n\n## Installation\n\n```sh\nnpm install --save buffer-alloc\n```\n\n## Usage\n\n```js\nconst alloc = require('buffer-alloc')\n\nconsole.log(alloc(4))\n//=> <Buffer 00 00 00 00>\n\nconsole.log(alloc(6, 0x41))\n//=> <Buffer 41 41 41 41 41 41>\n\nconsole.log(alloc(10, 'linus', 'utf8'))\n//=> <Buffer 6c 69 6e 75 73 6c 69 6e 75 73>\n```\n\n## API\n\n### alloc(size[, fill[, encoding]])\n\n- `size` &lt;Integer&gt; The desired length of the new `Buffer`\n- `fill` &lt;String&gt; | &lt;Buffer&gt; | &lt;Integer&gt; A value to pre-fill the new `Buffer` with. **Default:** `0`\n- `encoding` &lt;String&gt; If `fill` is a string, this is its encoding. **Default:** `'utf8'`\n\nAllocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the `Buffer` will be zero-filled.\n\n## See also\n\n- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe`\n- [buffer-fill](https://github.com/LinusU/buffer-fill) A ponyfill for `Buffer.fill`\n- [buffer-from](https://github.com/LinusU/buffer-from) A ponyfill for `Buffer.from`\n","publish_time":1471550013281,"_cnpm_publish_time":1471550013281,"dist-tags":{"latest":"1.2.0"}}