{"_id":"stream-to-buf","_rev":"2893319","name":"stream-to-buf","description":"convert stream to buffer","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"}],"time":{"modified":"2022-11-30T02:15:01.000Z","created":"2018-02-28T09:35:56.220Z","1.0.0":"2018-02-28T09:35:56.220Z"},"users":{},"author":{"name":"dead_horse"},"repository":{"type":"git","url":"git://github.com/node-modules/stream-to-buf.git"},"versions":{"1.0.0":{"name":"stream-to-buf","description":"convert stream to buffer","version":"1.0.0","homepage":"https://github.com/node-modules/stream-to-buf","repository":{"type":"git","url":"git://github.com/node-modules/stream-to-buf.git"},"dependencies":{"humanize-bytes":"^1.0.1"},"devDependencies":{"autod":"^3.0.1","egg-bin":"^4.4.0","egg-ci":"^1.8.0","eslint":"^4.18.1","eslint-config-egg":"^7.0.0"},"main":"index.js","files":["index.js"],"scripts":{"lint":"eslint test *.js","test":"npm run lint -- --fix && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","ci":"npm run lint && npm run cov","autod":"autod"},"author":{"name":"dead_horse"},"engines":{"node":">= 8.0.0"},"ci":{"version":"8, 9"},"license":"MIT","gitHead":"489d8beed36bd49a3df4ece060d0db72c5399fd4","bugs":{"url":"https://github.com/node-modules/stream-to-buf/issues"},"_id":"stream-to-buf@1.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.4.0","_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"dist":{"shasum":"b6369f474147513e9472854bd6123cd9af3d920f","size":1470,"noattachment":false,"key":"/stream-to-buf/-/stream-to-buf-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-to-buf/download/stream-to-buf-1.0.0.tgz"},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stream-to-buf_1.0.0_1519810556089_0.3201856139298469"},"_cnpmcore_publish_time":"2021-12-23T18:56:25.248Z","publish_time":1519810556220,"_cnpm_publish_time":1519810556220}},"readme":"stream-to-buf\n====\n\nCollect a readable stream's data into buffer. Support max size limit.\n\n## Install\n\n```bash\nnpm i stream-to-buf\n```\n\n## Usage\n\n```js\nconst streamTobuffer = require('stream-to-buf');\n\nconst stream = fs.createReadStream(path.join(__dirname, 'fixtures/file'));\nstreamToBuffer(stream, { maxSize: '10kb' }).then(onBuffer, onError);\n```\n\n### Options\n\n- `maxSize`: If stream's emitted buffer exceed `maxSize`, it will throw an error.(but it will still consume the stream before resolve).\n","_attachments":{},"homepage":"https://github.com/node-modules/stream-to-buf","bugs":{"url":"https://github.com/node-modules/stream-to-buf/issues"},"license":"MIT"}