{
  "_id": "buffer-fill",
  "maintainers": [
    {
      "name": "linusu",
      "email": "linus@folkdatorn.se"
    }
  ],
  "dist-tags": {
    "latest": "1.0.0"
  },
  "_rev": "6-2dd0025813e7a852dd9505998ff6d478",
  "description": "A [ponyfill](https://ponyfill.com) for `Buffer.fill`.",
  "readme": "# Buffer Fill\n\nA [ponyfill](https://ponyfill.com) for `Buffer.fill`.\n\nWorks as Node.js: `v6.4.0` <br>\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//=> <Buffer 08 08 08 08 08>\n\nconsole.log(buf.fill(9, 2, 4))\n//=> <Buffer 08 08 09 09 08>\n\nconsole.log(buf.fill('linus', 'latin1'))\n//=> <Buffer 6c 69 6e 75 73>\n\nconsole.log(buf.fill('\\u0222'))\n//=> <Buffer c8 a2 c8 a2 c8>\n```\n\n## API\n\n### fill(buf, value[, offset[, end]][, encoding])\n\n- `value` &lt;String&gt; | &lt;Buffer&gt; | &lt;Integer&gt; The value to fill `buf` with\n- `offset` &lt;Integer&gt; Where to start filling `buf`. **Default:** `0`\n- `end` &lt;Integer&gt; Where to stop filling `buf` (not inclusive). **Default:** `buf.length`\n- `encoding` &lt;String&gt; If `value` is a string, this is its encoding. **Default:** `'utf8'`\n- Return: &lt;Buffer&gt; 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",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/linusu/buffer-fill.git"
  },
  "bugs": {
    "url": "https://github.com/linusu/buffer-fill/issues"
  },
  "license": "MIT",
  "versions": {
    "0.1.0": {
      "name": "buffer-fill",
      "version": "0.1.0",
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/linusu/buffer-fill.git"
      },
      "scripts": {
        "test": "standard && node test"
      },
      "devDependencies": {
        "buffer-alloc-unsafe": "^0.1.0",
        "standard": "^7.1.2"
      },
      "gitHead": "641a1768ef6969e39112b7f17abb712b5a3c8745",
      "description": "A ponyfill for `Buffer.fill`.",
      "bugs": {
        "url": "https://github.com/linusu/buffer-fill/issues"
      },
      "homepage": "https://github.com/linusu/buffer-fill#readme",
      "_id": "buffer-fill@0.1.0",
      "_shasum": "ca9470e8d4d1b977fd7543f4e2ab6a7dc95101a8",
      "_from": ".",
      "_npmVersion": "3.10.3",
      "_nodeVersion": "6.4.0",
      "_npmUser": {
        "name": "linusu",
        "email": "linus@folkdatorn.se"
      },
      "dist": {
        "shasum": "ca9470e8d4d1b977fd7543f4e2ab6a7dc95101a8",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/buffer-fill/-/buffer-fill-0.1.0.tgz",
        "integrity": "sha512-xW0t8BGWbJ6fIsMQaghB9KdoLJyHROH4y/J1wjcQo4knRRTz5KPbOKCDwpwCSQnB4OiXWh2EWRXSCJ8+1EzDrQ==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQDIAjJ38zN+cpHpSMO78cjygbJH4FG7rLRCpPNq4o1eaAIhAOvpSqJJiFCkJ76HsDPDM8P4slmZDB2kkTKGFE+1Xr/K"
          }
        ]
      },
      "maintainers": [
        {
          "name": "linusu",
          "email": "linus@folkdatorn.se"
        }
      ],
      "_npmOperationalInternal": {
        "host": "packages-12-west.internal.npmjs.com",
        "tmp": "tmp/buffer-fill-0.1.0.tgz_1471782390114_0.5061105703935027"
      },
      "directories": {}
    },
    "0.1.1": {
      "name": "buffer-fill",
      "version": "0.1.1",
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/LinusU/buffer-fill.git"
      },
      "scripts": {
        "test": "standard && node test"
      },
      "devDependencies": {
        "buffer-alloc-unsafe": "^0.1.0",
        "standard": "^7.1.2"
      },
      "gitHead": "05801fc65b5aba70b494a169898f9836c4bf58c0",
      "description": "A [ponyfill](https://ponyfill.com) for `Buffer.fill`.",
      "bugs": {
        "url": "https://github.com/LinusU/buffer-fill/issues"
      },
      "homepage": "https://github.com/LinusU/buffer-fill#readme",
      "_id": "buffer-fill@0.1.1",
      "_npmVersion": "5.6.0",
      "_nodeVersion": "9.8.0",
      "_npmUser": {
        "name": "linusu",
        "email": "linus@folkdatorn.se"
      },
      "dist": {
        "integrity": "sha512-YgBMBzdRLEfgxJIGu2wrvI2E03tMCFU1p7d1KhB4BOoMN0VxmTFjSyN5JtKt9z8Z9JajMHruI6SE25W96wNv7Q==",
        "shasum": "76d825c4d6e50e06b7a31eb520c04d08cc235071",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/buffer-fill/-/buffer-fill-0.1.1.tgz",
        "fileCount": 4,
        "unpackedSize": 17141,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQCKFnMd5RT3c97zSzXngP0CwiX+epe7xgnE1/4IMOGN1QIhAOPyvSa9jhQPMDLS7itmXFkCrtWZwyv9qKH5h6OQjyU4"
          }
        ]
      },
      "maintainers": [
        {
          "name": "linusu",
          "email": "linus@folkdatorn.se"
        }
      ],
      "directories": {},
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/buffer-fill_0.1.1_1522093017539_0.8274415527762873"
      },
      "_hasShrinkwrap": false
    },
    "1.0.0": {
      "name": "buffer-fill",
      "version": "1.0.0",
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/linusu/buffer-fill.git"
      },
      "files": [
        "index.js"
      ],
      "scripts": {
        "test": "standard && node test"
      },
      "devDependencies": {
        "buffer-alloc-unsafe": "^1.1.0",
        "standard": "^7.1.2"
      },
      "gitHead": "a2badd1de771c99285e385dccdebd63093f0285a",
      "description": "A [ponyfill](https://ponyfill.com) for `Buffer.fill`.",
      "bugs": {
        "url": "https://github.com/linusu/buffer-fill/issues"
      },
      "homepage": "https://github.com/linusu/buffer-fill#readme",
      "_id": "buffer-fill@1.0.0",
      "_shasum": "f8f78b76789888ef39f205cd637f68e702122b2c",
      "_from": ".",
      "_npmVersion": "3.10.8",
      "_nodeVersion": "7.0.0",
      "_npmUser": {
        "name": "linusu",
        "email": "linus@folkdatorn.se"
      },
      "dist": {
        "shasum": "f8f78b76789888ef39f205cd637f68e702122b2c",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/buffer-fill/-/buffer-fill-1.0.0.tgz",
        "fileCount": 3,
        "unpackedSize": 4390,
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbDePZCRA9TVsSAnZWagAA6jAP/ilxGieW8Z7iZZjhfbLR\nhL+yhqdi5m0aSPzY4O7eb6e+Dd3/4fO8FxTcjQCpzie/n8Yo3uzY/RK0fN33\nDPh4kxNlHwrMhpBNuGG2RkKh114r1HkD+vVaWzZb+NFn523hv3OqDR7DOhHN\n7Zq9Y5QfHGma4dQRgfUvHFx0z6PRolCCB+3oGuSB8ER9VXMa6cOwr6whmccu\nwZzyVlpWEHCYekXGyrLtFRrIUezBDVitvz9QDMBn5feVh/tSsD42E/nUDaCW\njcm/TdvHssGyd1ZP6zGjgjvdMVBJgFsS8g9IJ/Vjojyd1KM3B5FI9bo4ChYt\nsL9FXZkcjVbsdGpnmXKVb2yHa9Bq/fPNRpi6zmLeKrsksLbkWMu8YU2U+sZ0\nBwIa/jCF9A1bMrrXgsPtgGQRQoVIL/MWRPtTgVlxupmAavZQJki4nKvQHF6H\nfCHDUTg3bBZgYXqPa+SBY7tqnw6b6CUioe2cZds96TXgZ+y+u28jj3+6j3ER\n+PBp/XMbTjUc8EVWEZEkNq4Hh9K4GhNGoM8CEKFtU6qmwLykrbB9JUskpNGk\naX/Tbx1MHxMU9o+uZ4AbIMmSTh097t6+Igx0HSQektms3mmtsAGx83oOLGd3\nK5Vil/u8V5//McTdf38G3kYlupClQQplYsSgvDxlU/Qg2rw8YJfDREXdAZI8\nnT2Y\r\n=hmqw\r\n-----END PGP SIGNATURE-----\r\n",
        "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQCVuyQNLX8bM3v4+1WWL1daPW+G8L/bv4eePIAppZAD3QIhAM5bXxJuCGRXNwXsJUfecXV/99zn8sdsBv9Ad5ZbrZY6"
          }
        ]
      },
      "maintainers": [
        {
          "name": "linusu",
          "email": "linus@folkdatorn.se"
        }
      ],
      "directories": {},
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/buffer-fill_1.0.0_1527636952747_0.20799370179837218"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "buffer-fill",
  "time": {
    "modified": "2026-05-25T00:26:41.832Z",
    "created": "2016-08-21T12:26:31.774Z",
    "0.1.0": "2016-08-21T12:26:31.774Z",
    "0.1.1": "2018-03-26T19:36:57.721Z",
    "1.0.0": "2018-05-29T23:35:52.932Z"
  },
  "readmeFilename": "readme.md",
  "homepage": "https://github.com/linusu/buffer-fill#readme"
}