{
  "_id": "buffer-alloc",
  "maintainers": [
    {
      "name": "linusu",
      "email": "linus@folkdatorn.se"
    }
  ],
  "keywords": [
    "alloc",
    "allocate",
    "buffer alloc",
    "buffer allocate",
    "buffer"
  ],
  "dist-tags": {
    "latest": "1.2.0"
  },
  "_rev": "8-781f0f3d2e2e0387e42fed56ae9c06da",
  "description": "A [ponyfill](https://ponyfill.com) for `Buffer.alloc`.",
  "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",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/LinusU/buffer-alloc.git"
  },
  "bugs": {
    "url": "https://github.com/LinusU/buffer-alloc/issues"
  },
  "license": "MIT",
  "versions": {
    "0.1.0": {
      "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": "https://archive.ito.gov.ir/npm/_packages/buffer-alloc/-/buffer-alloc-0.1.0.tgz",
        "integrity": "sha512-B77EJB1Ov4yr7AMmG0v65LFYkYaTyg6sju3oGNlUySC7+sVkECsATyfSFZYrObWnZ10ftL7BPw/6EnkjFDzkYA==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQDXjbqWR9ldeRGRCUgfCQlZqRw1zymK9GZUBoC2Y9kwRQIhAKh6RMG6Cfhsj+l8m4zw7IRH867SE2/ndpIsRI/CnbR3"
          }
        ]
      },
      "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": {}
    },
    "0.1.1": {
      "name": "buffer-alloc",
      "version": "0.1.1",
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/linusu/buffer-alloc.git"
      },
      "scripts": {
        "test": "standard && node test"
      },
      "dependencies": {
        "buffer-alloc-unsafe": "^0.1.0",
        "buffer-fill": "^0.1.0"
      },
      "devDependencies": {
        "standard": "^7.1.2"
      },
      "keywords": [
        "alloc",
        "allocate",
        "buffer alloc",
        "buffer allocate",
        "buffer"
      ],
      "gitHead": "fc4122e88d3395327bc1e25426c33cdce6382d8b",
      "description": "A ponyfill for `Buffer.alloc`.",
      "bugs": {
        "url": "https://github.com/linusu/buffer-alloc/issues"
      },
      "homepage": "https://github.com/linusu/buffer-alloc#readme",
      "_id": "buffer-alloc@0.1.1",
      "_shasum": "e76dbe4025bd65cac4018f6fc6d0436f3b24385c",
      "_from": ".",
      "_npmVersion": "3.10.3",
      "_nodeVersion": "6.4.0",
      "_npmUser": {
        "name": "linusu",
        "email": "linus@folkdatorn.se"
      },
      "dist": {
        "shasum": "e76dbe4025bd65cac4018f6fc6d0436f3b24385c",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/buffer-alloc/-/buffer-alloc-0.1.1.tgz",
        "integrity": "sha512-9gzRVwcbdyqUKNbFt9S/jQo/GvXVs9tcEWAqP3U+z10ZBahmrLPJG2fFoT/B7aOGHoFQZzYBn7xykMFZDGRqZw==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQC9PhqEr/YNPOyKsLSNJ/SjF+LMMtcZb0USPw2k6UJxIgIgcoHXIIuyn5Y1URF056nJ3FTgJuNUEMBedn3VUq1pylI="
          }
        ]
      },
      "maintainers": [
        {
          "name": "linusu",
          "email": "linus@folkdatorn.se"
        }
      ],
      "_npmOperationalInternal": {
        "host": "packages-16-east.internal.npmjs.com",
        "tmp": "tmp/buffer-alloc-0.1.1.tgz_1471784604174_0.48348633013665676"
      },
      "directories": {}
    },
    "1.0.0": {
      "name": "buffer-alloc",
      "version": "1.0.0",
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/linusu/buffer-alloc.git"
      },
      "scripts": {
        "test": "standard && node test"
      },
      "dependencies": {
        "buffer-alloc-unsafe": "^0.1.0",
        "buffer-fill": "^0.1.0"
      },
      "devDependencies": {
        "standard": "^7.1.2"
      },
      "keywords": [
        "alloc",
        "allocate",
        "buffer alloc",
        "buffer allocate",
        "buffer"
      ],
      "gitHead": "10dd2f831fd5e729cdb6d35d72cbe3c5da065406",
      "description": "A [ponyfill](https://ponyfill.com) for `Buffer.alloc`.",
      "bugs": {
        "url": "https://github.com/linusu/buffer-alloc/issues"
      },
      "homepage": "https://github.com/linusu/buffer-alloc#readme",
      "_id": "buffer-alloc@1.0.0",
      "_shasum": "e91b2a9626a90e0e8888af329d604628dc742fa6",
      "_from": ".",
      "_npmVersion": "3.10.9",
      "_nodeVersion": "7.1.0",
      "_npmUser": {
        "name": "linusu",
        "email": "linus@folkdatorn.se"
      },
      "dist": {
        "shasum": "e91b2a9626a90e0e8888af329d604628dc742fa6",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/buffer-alloc/-/buffer-alloc-1.0.0.tgz",
        "integrity": "sha512-jb1Y7jtJgSdr9oRlAPAxTn2HeBxc7/xXy5gqAzyAejYSmchKC38JCzy/cpPFFALyFWxpwPRUqAKst+gIBF1LEA==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIBz2tObbGfchJblGBSD+eOCBE13LIX66iz4pBRU5Z+HLAiA3nMEfTBkXPooyjAd9GOkDuQbn+HgfcG/3CtA7+h949A=="
          }
        ]
      },
      "maintainers": [
        {
          "name": "linusu",
          "email": "linus@folkdatorn.se"
        }
      ],
      "_npmOperationalInternal": {
        "host": "packages-12-west.internal.npmjs.com",
        "tmp": "tmp/buffer-alloc-1.0.0.tgz_1479820377720_0.685224276734516"
      },
      "directories": {}
    },
    "1.1.0": {
      "name": "buffer-alloc",
      "version": "1.1.0",
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/linusu/buffer-alloc.git"
      },
      "scripts": {
        "test": "standard && node test"
      },
      "dependencies": {
        "buffer-alloc-unsafe": "^0.1.0",
        "buffer-fill": "^0.1.0"
      },
      "devDependencies": {
        "standard": "^7.1.2"
      },
      "keywords": [
        "alloc",
        "allocate",
        "buffer alloc",
        "buffer allocate",
        "buffer"
      ],
      "gitHead": "b3f5765ddd6dd8ffbd3f34bbb8bee03c0d79a267",
      "description": "A [ponyfill](https://ponyfill.com) for `Buffer.alloc`.",
      "bugs": {
        "url": "https://github.com/linusu/buffer-alloc/issues"
      },
      "homepage": "https://github.com/linusu/buffer-alloc#readme",
      "_id": "buffer-alloc@1.1.0",
      "_shasum": "05514d33bf1656d3540c684f65b1202e90eca303",
      "_from": ".",
      "_npmVersion": "3.10.9",
      "_nodeVersion": "7.1.0",
      "_npmUser": {
        "name": "linusu",
        "email": "linus@folkdatorn.se"
      },
      "dist": {
        "shasum": "05514d33bf1656d3540c684f65b1202e90eca303",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/buffer-alloc/-/buffer-alloc-1.1.0.tgz",
        "integrity": "sha512-P/MkTG5pl2lHCFjfvEGtUBLN37mNVnyNYZJf4tuDMoy2T0jipbeEBLoBxUQCkLXRA9YxwmxbACLLfEXdT/Jveg==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQC9a1MavCHGYp56aObdRQIPK8mYTqD/dN8jpCf2H5WibQIhAI4AbYaO9o/MB4f1WaTq10W6bVKJc2Tmi121N1PV/Q70"
          }
        ]
      },
      "maintainers": [
        {
          "name": "linusu",
          "email": "linus@folkdatorn.se"
        }
      ],
      "_npmOperationalInternal": {
        "host": "packages-18-east.internal.npmjs.com",
        "tmp": "tmp/buffer-alloc-1.1.0.tgz_1480088089035_0.15028314059600234"
      },
      "directories": {}
    },
    "1.2.0": {
      "name": "buffer-alloc",
      "version": "1.2.0",
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/LinusU/buffer-alloc.git"
      },
      "files": [
        "index.js"
      ],
      "scripts": {
        "test": "standard && node test"
      },
      "dependencies": {
        "buffer-alloc-unsafe": "^1.1.0",
        "buffer-fill": "^1.0.0"
      },
      "devDependencies": {
        "standard": "^7.1.2"
      },
      "keywords": [
        "alloc",
        "allocate",
        "buffer alloc",
        "buffer allocate",
        "buffer"
      ],
      "gitHead": "a0d55382c805f3b117a055e0be203f13f2519cc5",
      "description": "A [ponyfill](https://ponyfill.com) for `Buffer.alloc`.",
      "bugs": {
        "url": "https://github.com/LinusU/buffer-alloc/issues"
      },
      "homepage": "https://github.com/LinusU/buffer-alloc#readme",
      "_id": "buffer-alloc@1.2.0",
      "_npmVersion": "5.6.0",
      "_nodeVersion": "10.2.1",
      "_npmUser": {
        "name": "linusu",
        "email": "linus@folkdatorn.se"
      },
      "dist": {
        "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
        "shasum": "890dd90d923a873e08e10e5fd51a57e5b7cce0ec",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
        "fileCount": 3,
        "unpackedSize": 2274,
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbDeUSCRA9TVsSAnZWagAARAEP/32m9WSt0ZIpF7+umUJY\nTzwhGXcaMYWtZOBdw+xkBY9F5+NlRIwNk6/EupLFi/BShct7VMccElsFNX21\nSxi1Jo/+EZZCULaV8Uh8QwEIpDHWN4C9SDBMbdLWORRVriQYYZgqNLVDBv9O\njraOM3MfC/6ESCbN2x+OHubawV3t02lwTwWcbdM42Y4kDekIugesoVIj1+Sq\nbyrjs1zisKTPLacuMHKKXj13pIOXvSTz7PVenVJZAuwm2bUJmxrfwtXFYLfK\npMNwyu3tv6Ci85Mq5gXGecPNbmVej8qyqJmwk4cqhZH4pxWhpqSb7g2chmTe\nQnqG/WsT1CDD6b4fTe8qLUZzZRT/X4sKyvM4hAL7nveUsU3EjjXWmHLGXmN/\nWjH3ZIkm8O7owXcbpEycwnySZiG8BmlcjvHiywwckjCt8v7UwrQocG/lE8gF\nef00DQLtd2JRdkTZt+WTgUY6siVKquhuVavJbUkQ2bZD+WZjPetohMOTLhUy\nIVHxvNGxoUKS9fGdBDKViRehO/5qX84Ic2Y59NSPtAh5h52yviYtUam6qdKf\nXigpwDZBBqA4lAZ9TP0rs9ZfR/rsxTryRAYQz0LbHIFaYN3uNvkU11IMJ6wv\n/Yg3rVL4znO9w2R5FpsoMYReAnZLIM8QfpTIcIDgfI+LAU+Fgylznj7mNBwM\nLAJU\r\n=hQoj\r\n-----END PGP SIGNATURE-----\r\n",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIHoSah2lUoh0mXg2KZai16SYC518nhQbVWxys0diyj4JAiBBFBU7y7Rn4vunBnysWiiAlxk+1ND+5SXScToSvhgCKQ=="
          }
        ]
      },
      "maintainers": [
        {
          "name": "linusu",
          "email": "linus@folkdatorn.se"
        }
      ],
      "directories": {},
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/buffer-alloc_1.2.0_1527637266526_0.19419340644925764"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "buffer-alloc",
  "time": {
    "modified": "2026-05-23T07:14:13.481Z",
    "created": "2016-08-18T19:53:33.281Z",
    "0.1.0": "2016-08-18T19:53:33.281Z",
    "0.1.1": "2016-08-21T13:03:25.545Z",
    "1.0.0": "2016-11-22T13:12:59.726Z",
    "1.1.0": "2016-11-25T15:34:49.624Z",
    "1.2.0": "2018-05-29T23:41:06.589Z"
  },
  "readmeFilename": "readme.md",
  "homepage": "https://github.com/LinusU/buffer-alloc#readme"
}