{"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":"http://registry-npm.ywwl.com/to-buffer/download/to-buffer-1.2.0.tgz","fileCount":8,"integrity":"sha512-uM2Zapt+GfaxYhCxKtUn7ktNOjAHL8nthQIQVhvNCjGLe8t+ULQ5i5hyFpMzuRxHkg2nrKNFTQpYDLhzxC3Jew==","signatures":[{"sig":"MEYCIQDoQN6ebd6D05aIxLj6yWRLRzPv1qRiVr0KGwo2kdjtLAIhAOigOu1lBImGtpoTq5K5pnzNj+zbmEcEldRHeP0JOl0G","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12162,"size":5254,"noattachment":false,"key":"/to-buffer/-/to-buffer-1.2.0.tgz"},"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"},"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","publish_time":1750199291124,"_cnpm_publish_time":1750199291124,"dist-tags":{"latest":"1.2.2"}}