{ "_args": [ [ { "raw": "buffer-fill@^0.1.0", "scope": null, "escapedName": "buffer-fill", "name": "buffer-fill", "rawSpec": "^0.1.0", "spec": ">=0.1.0 <0.2.0", "type": "range" }, "/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/buffer-alloc" ] ], "_from": "buffer-fill@>=0.1.0 <0.2.0", "_id": "buffer-fill@0.1.0", "_inCache": true, "_location": "/buffer-fill", "_nodeVersion": "6.4.0", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", "tmp": "tmp/buffer-fill-0.1.0.tgz_1471782390114_0.5061105703935027" }, "_npmUser": { "name": "linusu", "email": "linus@folkdatorn.se" }, "_npmVersion": "3.10.3", "_phantomChildren": {}, "_requested": { "raw": "buffer-fill@^0.1.0", "scope": null, "escapedName": "buffer-fill", "name": "buffer-fill", "rawSpec": "^0.1.0", "spec": ">=0.1.0 <0.2.0", "type": "range" }, "_requiredBy": [ "/buffer-alloc" ], "_resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-0.1.0.tgz", "_shasum": "ca9470e8d4d1b977fd7543f4e2ab6a7dc95101a8", "_shrinkwrap": null, "_spec": "buffer-fill@^0.1.0", "_where": "/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/buffer-alloc", "bugs": { "url": "https://github.com/LinusU/buffer-fill/issues" }, "dependencies": {}, "description": "A ponyfill for `Buffer.fill`.", "devDependencies": { "buffer-alloc-unsafe": "^0.1.0", "standard": "^7.1.2" }, "directories": {}, "dist": { "shasum": "ca9470e8d4d1b977fd7543f4e2ab6a7dc95101a8", "tarball": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-0.1.0.tgz" }, "gitHead": "641a1768ef6969e39112b7f17abb712b5a3c8745", "homepage": "https://github.com/LinusU/buffer-fill#readme", "license": "MIT", "maintainers": [ { "name": "linusu", "email": "linus@folkdatorn.se" } ], "name": "buffer-fill", "optionalDependencies": {}, "readme": "# Buffer Fill\n\nA ponyfill for `Buffer.fill`.\n\nWorks as Node.js: `v6.4.0`
\nWorks on Node.js: `v0.10.0`\n\n## Installation\n\n```sh\nnpm install --save buffer-fill\n```\n\n## Usage\n\n```js\nconst fill = require('buffer-fill')\nconst buf = Buffer.allocUnsafe(5)\n\nconsole.log(buf.fill(8))\n//=> \n\nconsole.log(buf.fill(9, 2, 4))\n//=> \n\nconsole.log(buf.fill('linus', 'latin1'))\n//=> \n\nconsole.log(buf.fill('\\u0222'))\n//=> \n```\n\n## API\n\n### fill(buf, value[, offset[, end]][, encoding])\n\n- `value` <String> | <Buffer> | <Integer> The value to fill `buf` with\n- `offset` <Integer> Where to start filling `buf`. **Default:** `0`\n- `end` <Integer> Where to stop filling `buf` (not inclusive). **Default:** `buf.length`\n- `encoding` <String> If `value` is a string, this is its encoding. **Default:** `'utf8'`\n- Return: <Buffer> A reference to `buf`\n\nFills `buf` with the specified `value`. If the `offset` and `end` are not given,\nthe entire `buf` will be filled. This is meant to be a small simplification to\nallow the creation and filling of a `Buffer` to be done on a single line.\n\nIf the final write of a `fill()` operation falls on a multi-byte character, then\nonly the first bytes of that character that fit into `buf` are written.\n\n## See also\n\n- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe`\n- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc`\n- [buffer-from](https://github.com/LinusU/buffer-from) A ponyfill for `Buffer.from`\n", "readmeFilename": "readme.md", "repository": { "type": "git", "url": "git+https://github.com/LinusU/buffer-fill.git" }, "scripts": { "test": "standard && node test" }, "version": "0.1.0" }