{"_id":"stream2buffer","_rev":"9-a293c74d1337d1350ae0777858b7648f","name":"stream2buffer","description":"Concatenate a readable stream's data into a single buffer","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.2":{"name":"stream2buffer","description":"Concatenate a readable stream's data into a single buffer","version":"0.0.2","author":{"name":"João Jerónimo","email":"jj@crowdprocess.com","url":"http://joaojeronimo.me"},"repository":{"type":"git","url":"https://github.com/CrowdProcess/stream-to-buffer.git"},"bugs":{"url":"https://github.com/CrowdProcess/stream-to-buffer/issues","email":"jj@crowdprocess.com"},"license":"MIT","engines":{"node":">= 0.10"},"devDependencies":{"tap":"~0.4.4"},"scripts":{"test":"tap ./tests/*.js"},"_id":"stream2buffer@0.0.2","dist":{"shasum":"1bfb3696897ea2f62b29d7df4684dd911a270e05","tarball":"https://registry.npmjs.org/stream2buffer/-/stream2buffer-0.0.2.tgz","integrity":"sha512-JReamuDGGV268SbLdc3R8utLR+EYCmFsLi3RImu1GjWe2ctnau2efVG7vYMc4GS9iVy0kpmmItzfVOLBah1MMA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEID1xBFGjoKeOZe8cyS1xLEmGqkzY3sB0xiWpcEIKyQIgdf3gGWv11GwJAxCX2vLz5oKNKMS4+Io7DnIjY/LIjDU="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"joaojeronimo","email":"jj@crowdprocess.com"},"maintainers":[{"name":"joaojeronimo","email":"jj@crowdprocess.com"}]},"0.0.3":{"name":"stream2buffer","description":"Concatenate a readable stream's data into a single buffer","version":"0.0.3","author":{"name":"João Jerónimo","email":"jj@crowdprocess.com","url":"http://joaojeronimo.me"},"repository":{"type":"git","url":"https://github.com/CrowdProcess/stream-to-buffer.git"},"bugs":{"url":"https://github.com/CrowdProcess/stream-to-buffer/issues","email":"jj@crowdprocess.com"},"license":"MIT","engines":{"node":">= 0.10"},"devDependencies":{"tap":"~0.4.4"},"scripts":{"test":"tap ./tests/*.js"},"_id":"stream2buffer@0.0.3","dist":{"shasum":"f145d524f4a12e4794ceeb9f84734e1c12accf07","tarball":"https://registry.npmjs.org/stream2buffer/-/stream2buffer-0.0.3.tgz","integrity":"sha512-GcwBuSYmAxVfW9iFnefEPZ7jg/0NPVTLobWr2c+knNHbEwL4C0RoW6knyQzRRNOUqzuqAREor0um+GjCLIMnEw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGGPxKv+TZLNsyWmYKMKrrB6g9Q3bfofViAtto1BgrSTAiBbMavKUpXfyuM0jumGxALQuSHQ33RrpDFZsHx4Y5AnVQ=="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"joaojeronimo","email":"jj@crowdprocess.com"},"maintainers":[{"name":"joaojeronimo","email":"jj@crowdprocess.com"}]},"0.0.4":{"name":"stream2buffer","description":"Concatenate a readable stream's data into a single buffer","version":"0.0.4","author":{"name":"João Jerónimo","email":"jj@crowdprocess.com","url":"http://joaojeronimo.me"},"repository":{"type":"git","url":"https://github.com/CrowdProcess/stream2buffer.git"},"bugs":{"url":"https://github.com/CrowdProcess/stream2buffer/issues","email":"jj@crowdprocess.com"},"license":"MIT","engines":{"node":">= 0.10"},"devDependencies":{"tap":"~0.4.8"},"scripts":{"test":"tap ./tests/*.js"},"homepage":"https://github.com/CrowdProcess/stream2buffer","_id":"stream2buffer@0.0.4","dist":{"shasum":"46f78bbdae094239b803f20e1f050ea6dd7b6a39","tarball":"https://registry.npmjs.org/stream2buffer/-/stream2buffer-0.0.4.tgz","integrity":"sha512-BoPiUKceku5VWOgrhn9h+E+A8YdauD3MwkXIiy5mVN8W4n42XWU+N4PycxkLTD+xAFhV64e8nkPJRjQQ11Ifcg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5lX37zHmRDDIIGMB8698DN3PEgTd3aHTqGQjP/Yb/4gIgSR+lU9VHPfAFFwTK5PYWG4nv4kUit8O6LrNg1FcgCXo="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"joaojeronimo","email":"jj@crowdprocess.com"},"maintainers":[{"name":"joaojeronimo","email":"jj@crowdprocess.com"}]}},"readme":"# Stream to Buffer\n\nConcatenate a readable stream's data into a single buffer.\n\nIt will concatenate a raw stream to a `Buffer`, an ascii or utf8\nencoded stream to a `String`, and an object mode stream to an\n`Array`.\n\n## Installing\n\n    npm install --save stream2buffer\n\n## API\n\n```js\nvar stream2Buffer = require('stream2buffer');\nvar fs = require('fs');\nvar Readable = require('stream').Readable;\nvar assert = require('assert');\n\n// Raw stream\nvar rawStream = fs.createReadStream('hamlet.txt');\nstream2Buffer(rawStream, function (err, buffer) {\n  assert.ok(buffer instanceof Buffer);\n  assert.ok(Buffer.isBuffer(buffer));\n});\n\n// utf8 encoded stream\nvar encodedStream = fs.createReadStream('hamlet.txt', {\n  encoding: 'utf8' // would be the same with ascii here\n});\nstream2Buffer(encodedStream, function (err, buffer) {\n  assert.ok(typeof buffer === 'string');\n});\n\n// object mode stream\nvar objectStream = new Readable({ objectMode: true });\nvar n = 10;\nobjectStream._read = function _read () {\n  objectStream.push({ \"hello\": \"world\" });\n  if (!n--)\n    objectStream.push(null);\n};\nstream2Buffer(objectStream, function (err, buffer) {\n  assert.ok(buffer instanceof Array);\n  assert.ok(Array.isArray(buffer));\n});\n```\n\n## A fork of\n\n[Jonathan Ong](https://github.com/jonathanong)'s [`stream-to-buffer`](https://github.com/jonathanong/stream-to-buffer/tree/10874042b9c5c1c447889c028fa078a40eed830d).\nI forked it because we disagree on how much [`stream-to-buffer` must\nknow](https://github.com/jonathanong/stream-to-buffer/pull/2)\nto work properly.\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2013 Jonathan Ong me@jongleberry.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","maintainers":[{"name":"joaojeronimo","email":"jj@crowdprocess.com"}],"time":{"modified":"2022-06-27T00:51:44.972Z","created":"2013-09-12T10:14:20.529Z","0.0.2":"2013-09-12T10:14:23.800Z","0.0.3":"2013-09-23T13:05:19.360Z","0.0.4":"2014-04-17T16:23:07.614Z"},"author":{"name":"João Jerónimo","email":"jj@crowdprocess.com","url":"http://joaojeronimo.me"},"repository":{"type":"git","url":"https://github.com/CrowdProcess/stream2buffer.git"},"homepage":"https://github.com/CrowdProcess/stream2buffer","bugs":{"url":"https://github.com/CrowdProcess/stream2buffer/issues","email":"jj@crowdprocess.com"},"license":"MIT","readmeFilename":"README.md"}