{"_id":"to-buffer","_rev":"12-e54b7ec4d4227086cabe557d962c337f","name":"to-buffer","dist-tags":{"latest":"1.2.2"},"versions":{"1.0.0":{"name":"to-buffer","version":"1.0.0","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"MIT","_id":"to-buffer@1.0.0","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/mafintosh/to-buffer","bugs":{"url":"https://github.com/mafintosh/to-buffer/issues"},"dist":{"shasum":"9a3d84bc3418679add0251ae92d3e4c41b38af32","tarball":"https://registry.npmjs.org/to-buffer/-/to-buffer-1.0.0.tgz","integrity":"sha512-oETzOFJSiQJqB1nj3XyvYhiceJVdlDLGgvjL49GNtGc0+ye/sPuJ0g5z0pM/Bt3M6iZoOviGs0rk5lLZ89UY/g==","signatures":[{"sig":"MEUCIF58OMnxgjWZomkrwAWMXorpaB036Fztk8q9Sp9H/SdGAiEA9buuwCplRAY84NtWjd3bEBb9zzwH5anGQIEAl8NPzO4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"9a3d84bc3418679add0251ae92d3e4c41b38af32","gitHead":"b57a85697b94dfd17ffc2d8c90484ece06ff5e7f","scripts":{"test":"standard && tape test.js"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"repository":{"url":"https://github.com/mafintosh/to-buffer.git","type":"git"},"_npmVersion":"2.14.7","description":"WIP - nothing to see here","directories":{},"_nodeVersion":"4.2.3","dependencies":{},"devDependencies":{"tape":"^4.4.0","standard":"^6.0.5"},"_npmOperationalInternal":{"tmp":"tmp/to-buffer-1.0.0.tgz_1455566673200_0.9151617083698511","host":"packages-9-west.internal.npmjs.com"}},"1.0.1":{"name":"to-buffer","version":"1.0.1","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"MIT","_id":"to-buffer@1.0.1","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/mafintosh/to-buffer","bugs":{"url":"https://github.com/mafintosh/to-buffer/issues"},"dist":{"shasum":"91283f91a2a1935200dcb32a6aaeab5828955612","tarball":"https://registry.npmjs.org/to-buffer/-/to-buffer-1.0.1.tgz","integrity":"sha512-EerHoa0Qy0crF7sk7tzDzRwOh3RyOTh8N2n8XN/Do6trIL7R2t8p2WCp5NJVdhk/pOcj6PuztQcIEC1W1t69bQ==","signatures":[{"sig":"MEYCIQDTH93YUFWmdNmKEVrOoOxaoGMBK4rLFMbOjQrwxuVs5gIhAJmvdNhtzr2WqO7Tebc1BH6JhY4/2KXz0jY3vPfIYL9q","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"91283f91a2a1935200dcb32a6aaeab5828955612","gitHead":"8b7b0403ce3ea12a20c53d154c28082918a310bc","scripts":{"test":"standard && tape test.js"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"repository":{"url":"https://github.com/mafintosh/to-buffer.git","type":"git"},"_npmVersion":"2.14.7","description":"Pass in a string, get a buffer back. Pass in a buffer, get the same buffer back","directories":{},"_nodeVersion":"4.2.3","dependencies":{},"devDependencies":{"tape":"^4.4.0","standard":"^6.0.5"},"_npmOperationalInternal":{"tmp":"tmp/to-buffer-1.0.1.tgz_1455566751907_0.7123836160171777","host":"packages-5-east.internal.npmjs.com"}},"1.1.0":{"name":"to-buffer","version":"1.1.0","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"MIT","_id":"to-buffer@1.1.0","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/mafintosh/to-buffer","bugs":{"url":"https://github.com/mafintosh/to-buffer/issues"},"dist":{"shasum":"375bc03edae5c35a8fa0b3fe95a1f3985db1dcfa","tarball":"https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.0.tgz","integrity":"sha512-0DPnf0StXI1xQuId9iMQ4+cnuPSZGmZJwW8GmbzqLqpto0ol6EzRrVKs/r/dCAvZdu8WKaAabxm30ZHYgznEkw==","signatures":[{"sig":"MEQCIDt2y534/lEzOTA7WcacjX7aK2/CpSR+VoEqKVbKmTFbAiBxZB9r1dzbo0bBdekC36FLwRzgPnpGzbAEID5QY95f2g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"375bc03edae5c35a8fa0b3fe95a1f3985db1dcfa","gitHead":"e70eedf2492df123ea19d1c52bf07bf2e590b080","scripts":{"test":"standard && tape test.js"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"repository":{"url":"git+https://github.com/mafintosh/to-buffer.git","type":"git"},"_npmVersion":"3.10.10","description":"Pass in a string, get a buffer back. Pass in a buffer, get the same buffer back","directories":{},"_nodeVersion":"6.9.5","dependencies":{},"devDependencies":{"tape":"^4.4.0","standard":"^6.0.5"},"_npmOperationalInternal":{"tmp":"tmp/to-buffer-1.1.0.tgz_1492026371375_0.07645408087410033","host":"packages-12-west.internal.npmjs.com"}},"1.1.1":{"name":"to-buffer","version":"1.1.1","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"MIT","_id":"to-buffer@1.1.1","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/mafintosh/to-buffer","bugs":{"url":"https://github.com/mafintosh/to-buffer/issues"},"dist":{"shasum":"493bd48f62d7c43fcded313a03dcadb2e1213a80","tarball":"https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz","fileCount":6,"integrity":"sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==","signatures":[{"sig":"MEYCIQCu5itX+4vVo3x9hZor1eY/teEte4f2I54Fym816/uXywIhAMH5TL43GFKCz1mVT0OM+R5a8Ejg+1hvAJAMgnoJchs4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3254,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4eiZCRA9TVsSAnZWagAA8LgQAJ5GG58jcIfPKs/HYLqA\n2YKCnomJUKJyazkUHaKhm+0yHLfQosxFnWM0W+GrIYtotUunuoczOX1Ba1dc\nqC5QVRUg2/Zvwu/TC9d6QVc+To8bQaGexp6rG9F6MX0GcUD2Huv6JdFyT9Wu\nC88fRK8QCNQNP0BUOI5KkYZ/bsq3U8iXi1zDW9WmNORPrjM4pJhK+phzENM4\nuHXzCfVbF17mnIMIcqdA6+cORHHRCirs6oUruxgTgUmbXUG0mGgsIjfCzDdx\nPhrXNvqXzclxRxaoDYoGefa0gT0m08exrfOu7h9RAjHOYyGoXNzHyF9vkeZm\nc/2GnUgjVM3r7kugexMMqJ0dq6eJ/BmmgNJT42vDXXsvTRa1Q9qWzyJBMXvs\nZ/ssrllUspBAOAPFfDuKJ1n0nNl/MZg7HXFgwDDdmn2/ySm+XEDSM8xV0OJJ\nFkOhOu8jn5nZT22aaum21fvI63TStuiOC/tO01rT2xSuPf2i4pHgzxJoLPnq\nRaEig4ylwnT5nHLGwYr6kSYo7l0yneSIEpcxIUuLXj3GlcJMwHz77zXJsppu\nxtpHZjgEwQ+8jK0HJ8tDCE++W/v7p+klws17GBLZQl4YDQVqIJvFy+6YkuML\n/QVKEWXR59xUA/thIXtcyLC4ZIsZqjefE0EtRtNTpYNocMl76+o1Re5vwTbb\ntxDk\r\n=QAFc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"17a1aa27bfce0218979472cfe4776b50438e8857","scripts":{"test":"standard && tape test.js"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"repository":{"url":"git+https://github.com/mafintosh/to-buffer.git","type":"git"},"_npmVersion":"5.6.0","description":"Pass in a string, get a buffer back. Pass in a buffer, get the same buffer back","directories":{},"_nodeVersion":"9.11.1","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"tape":"^4.4.0","standard":"^6.0.5"},"_npmOperationalInternal":{"tmp":"tmp/to-buffer_1.1.1_1524754584618_0.8258302631612433","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"to-buffer","version":"1.2.0","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"MIT","_id":"to-buffer@1.2.0","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"},{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/browserify/to-buffer","bugs":{"url":"https://github.com/browserify/to-buffer/issues"},"dist":{"shasum":"0a602aa0409ba2ce4bcef8ba319958b169cbcfb5","tarball":"https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.0.tgz","fileCount":8,"integrity":"sha512-uM2Zapt+GfaxYhCxKtUn7ktNOjAHL8nthQIQVhvNCjGLe8t+ULQ5i5hyFpMzuRxHkg2nrKNFTQpYDLhzxC3Jew==","signatures":[{"sig":"MEYCIQDoQN6ebd6D05aIxLj6yWRLRzPv1qRiVr0KGwo2kdjtLAIhAOigOu1lBImGtpoTq5K5pnzNj+zbmEcEldRHeP0JOl0G","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12162},"main":"index.js","engines":{"node":">= 0.4"},"gitHead":"6686e2ae4801c4428442c5267401ea66c82bd249","scripts":{"lint":"eslint --ext=js,mjs .","test":"npm run tests-only","prepack":"npmignore --auto --commentLines=autogenerated","pretest":"npm run lint","version":"auto-changelog && git add CHANGELOG.md","posttest":"npx npm@\">= 10.2\" audit --production","tests-only":"nyc tape 'test/**/*'","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"_npmUser":{"name":"ljharb","actor":{"name":"ljharb","type":"user","email":"ljharb@gmail.com"},"email":"ljharb@gmail.com"},"repository":{"url":"git+https://github.com/browserify/to-buffer.git","type":"git"},"_npmVersion":"11.3.0","description":"Pass in a string, array, Buffer, Data View, or Uint8Array, and get a Buffer back.","directories":{},"sideEffects":false,"_nodeVersion":"24.2.0","dependencies":{"isarray":"^2.0.5","safe-buffer":"^5.2.1"},"publishConfig":{"ignore":[".github/workflows","test"]},"_hasShrinkwrap":false,"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","hideCredit":true,"unreleased":false,"commitLimit":false,"backfillLimit":false},"devDependencies":{"nyc":"^10.3.2","tape":"^5.9.0","eslint":"=8.8.0","encoding":"^0.1.13","for-each":"^0.3.5","npmignore":"^0.3.1","auto-changelog":"^2.5.0","@ljharb/eslint-config":"^21.1.1","available-typed-arrays":"^1.0.7"},"_npmOperationalInternal":{"tmp":"tmp/to-buffer_1.2.0_1750199290873_0.9356416790873092","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"to-buffer","version":"1.2.1","author":{"url":"@mafintosh","name":"Mathias Buus"},"license":"MIT","_id":"to-buffer@1.2.1","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"},{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/browserify/to-buffer","bugs":{"url":"https://github.com/browserify/to-buffer/issues"},"dist":{"shasum":"2ce650cdb262e9112a18e65dc29dcb513c8155e0","tarball":"https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.1.tgz","fileCount":8,"integrity":"sha512-tB82LpAIWjhLYbqjx3X4zEeHN6M8CiuOEy2JY8SEQVdYRe3CCHOFaqrBW1doLDrfpWhplcW7BL+bO3/6S3pcDQ==","signatures":[{"sig":"MEYCIQCbLR3voGvB00oS/9DupzaPccu4N9UCFyiFpFctPdLJWAIhAKZ3H4mF9te1KDold7P2KkLWZwqalTm3BpgRW7uYnahV","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13669},"main":"index.js","engines":{"node":">= 0.4"},"gitHead":"07afa81f7281d5987258697d4624d8eb721f066e","scripts":{"lint":"eslint --ext=js,mjs .","test":"npm run tests-only","prepack":"npmignore --auto --commentLines=autogenerated","pretest":"npm run lint","version":"auto-changelog && git add CHANGELOG.md","posttest":"npx npm@\">= 10.2\" audit --production","tests-only":"nyc tape 'test/**/*'","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"_npmUser":{"name":"ljharb","actor":{"name":"ljharb","type":"user","email":"ljharb@gmail.com"},"email":"ljharb@gmail.com"},"repository":{"url":"git+https://github.com/browserify/to-buffer.git","type":"git"},"_npmVersion":"11.3.0","description":"Pass in a string, array, Buffer, Data View, or Uint8Array, and get a Buffer back.","directories":{},"sideEffects":false,"_nodeVersion":"24.2.0","dependencies":{"isarray":"^2.0.5","safe-buffer":"^5.2.1","typed-array-buffer":"^1.0.3"},"publishConfig":{"ignore":[".github/workflows","test"]},"_hasShrinkwrap":false,"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","hideCredit":true,"unreleased":false,"commitLimit":false,"backfillLimit":false},"devDependencies":{"nyc":"^10.3.2","tape":"^5.9.0","eslint":"=8.8.0","encoding":"^0.1.13","for-each":"^0.3.5","npmignore":"^0.3.1","auto-changelog":"^2.5.0","@ljharb/eslint-config":"^21.1.1","available-typed-arrays":"^1.0.7"},"_npmOperationalInternal":{"tmp":"tmp/to-buffer_1.2.1_1750400125558_0.4380206988383526","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"to-buffer","version":"1.2.2","description":"Pass in a string, array, Buffer, Data View, or Uint8Array, and get a Buffer back.","main":"index.js","sideEffects":false,"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","lint":"eslint --ext=js,mjs .","pretest":"npm run lint","tests-only":"nyc tape 'test/**/*'","test":"npm run tests-only","posttest":"npx npm@\">= 10.2\" audit --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/browserify/to-buffer.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/browserify/to-buffer/issues"},"homepage":"https://github.com/browserify/to-buffer","dependencies":{"isarray":"^2.0.5","safe-buffer":"^5.2.1","typed-array-buffer":"^1.0.3"},"devDependencies":{"@ljharb/eslint-config":"^21.2.0","auto-changelog":"^2.5.0","available-typed-arrays":"^1.0.7","encoding":"^0.1.13","eslint":"=8.8.0","for-each":"^0.3.5","npmignore":"^0.3.1","nyc":"^10.3.2","tape":"^5.9.0"},"engines":{"node":">= 0.4"},"publishConfig":{"ignore":[".github/workflows",".eslintrc",".nycrc","test"]},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"_id":"to-buffer@1.2.2","gitHead":"47c574df5d2f45acbc762ce2eaa760b1263a3ae9","_nodeVersion":"24.8.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw==","shasum":"ffe59ef7522ada0a2d1cb5dfe03bb8abc3cdc133","tarball":"https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.2.tgz","fileCount":6,"unpackedSize":14005,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGLqv3h8qf8FrOl6cEoq/e1JQGC/C6IpIWLOTkYhdigIAiEAn9SjMi6+tKS5s97+d25a2TyLaOd4aBLhbvdmH3/KXGk="}]},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"},{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/to-buffer_1.2.2_1758755621747_0.47814871053285546"},"_hasShrinkwrap":false}},"time":{"created":"2016-02-15T20:04:36.934Z","modified":"2025-09-24T23:13:42.100Z","1.0.0":"2016-02-15T20:04:36.934Z","1.0.1":"2016-02-15T20:05:54.031Z","1.1.0":"2017-04-12T19:46:13.233Z","1.1.1":"2018-04-26T14:56:24.701Z","1.2.0":"2025-06-17T22:28:11.124Z","1.2.1":"2025-06-20T06:15:25.734Z","1.2.2":"2025-09-24T23:13:41.914Z"},"bugs":{"url":"https://github.com/browserify/to-buffer/issues"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","homepage":"https://github.com/browserify/to-buffer","repository":{"type":"git","url":"git+https://github.com/browserify/to-buffer.git"},"description":"Pass in a string, array, Buffer, Data View, or Uint8Array, and get a Buffer back.","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"},{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"readme":"# to-buffer <sup>[![Version Badge][2]][1]</sup>\n\nPass in a string, array, Buffer, Data View, or Uint8Array, and get a Buffer back.\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![dependency status][5]][6]\n[![dev dependency status][7]][8]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][11]][1]\n\n\n```\nnpm install to-buffer\n```\n\n## Usage\n\n``` js\nvar toBuffer = require('to-buffer');\n\nconsole.log(toBuffer('hi')); // <Buffer 68 69>\nconsole.log(toBuffer(Buffer('hi'))); // <Buffer 68 69>\nconsole.log(toBuffer('6869', 'hex')); // <Buffer 68 69>\nconsole.log(toBuffer(43)); // throws\n```\n\n[1]: https://npmjs.org/package/to-buffer\n[2]: https://versionbadg.es/browserify/to-buffer.svg\n[5]: https://david-dm.org/browserify/to-buffer.svg\n[6]: https://david-dm.org/browserify/to-buffer\n[7]: https://david-dm.org/browserify/to-buffer/dev-status.svg\n[8]: https://david-dm.org/browserify/to-buffer#info=devDependencies\n[11]: https://nodei.co/npm/to-buffer.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/to-buffer.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/to-buffer.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=to-buffer\n[codecov-image]: https://codecov.io/gh/browserify/to-buffer/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/browserify/to-buffer/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/browserify/to-buffer\n[actions-url]: https://github.com/browserify/to-buffer/actions\n","readmeFilename":"README.md"}