{"_id":"stream-to-array","_rev":"24-e226745115026023711e10aa996b0c09","name":"stream-to-array","description":"Concatenate a readable stream's data into a single array","dist-tags":{"latest":"2.3.0"},"versions":{"1.0.0":{"name":"stream-to-array","description":"Concatenate a readable stream's data into a single array","version":"1.0.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/stream-utils/stream-to-array.git"},"bugs":{"url":"https://github.com/stream-utils/stream-to-array/issues"},"devDependencies":{"co":"*","gnode":"*","mocha":"*"},"scripts":{"test":"NODE=gnode make test"},"engines":{"node":">= 0.10.0"},"homepage":"https://github.com/stream-utils/stream-to-array","_id":"stream-to-array@1.0.0","dist":{"shasum":"94166bb29f3ea24f082d2f8cd3ebb2cc0d6eca2c","tarball":"https://registry.npmjs.org/stream-to-array/-/stream-to-array-1.0.0.tgz","integrity":"sha512-Z+ny0tylkXcRS4Jq49BNcKVmt0MrF3E/I500a18zckGt0ZMrOh1ILlbUz+FSjJePYeVbNUBCdvjfDDol27Ld1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIArEKYFezmnBjtwgEil+tYsQ/lTMyOKv6OrbyrStnaBAAiAA1mZD43MHBi/+ZDK6IF4SfgRFyYD7a5oVwh0MT6D3PQ=="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"directories":{}},"2.0.0":{"name":"stream-to-array","description":"Concatenate a readable stream's data into a single array","version":"2.0.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/stream-utils/stream-to-array"},"dependencies":{"bluebird":"2"},"devDependencies":{"mocha":"1","istanbul":"0"},"scripts":{"test":"mocha --reporter spec --bail","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"files":["index.js"],"gitHead":"d6ca1dcef9d9bbd585e4a42a3ad0e070f0eeaeab","bugs":{"url":"https://github.com/stream-utils/stream-to-array/issues"},"homepage":"https://github.com/stream-utils/stream-to-array","_id":"stream-to-array@2.0.0","_shasum":"6da77ecc50e3f739aac62d44e48c69c096d9f38d","_from":".","_npmVersion":"1.4.16","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"dist":{"shasum":"6da77ecc50e3f739aac62d44e48c69c096d9f38d","tarball":"https://registry.npmjs.org/stream-to-array/-/stream-to-array-2.0.0.tgz","integrity":"sha512-nt2Vffbv5Y/NxfzOyA/8i4hL6AeMoJBT1YBr/Lfr5Ajs12Qcq/m2r7ddk3xcUEEWHzHwuN54pFyYZcK/pRMBNg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCO8dmnA5cD9xs7mHHcrgQCtckThgNbwzbSVMGEp+464AIgJKQV7db0AsT16CozvYaB7LizabIxfPFkdxtOXTmgw+s="}]},"directories":{}},"2.0.1":{"name":"stream-to-array","description":"Concatenate a readable stream's data into a single array","version":"2.0.1","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/stream-utils/stream-to-array"},"dependencies":{"native-or-bluebird":"1"},"devDependencies":{"bluebird":"2","mocha":"1","istanbul":"0"},"scripts":{"test":"mocha --reporter spec --bail","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"files":["index.js"],"keywords":["stream","streams","buffer","array","concat"],"gitHead":"7a4091efc6b49dccd736d5695f851714d52dff38","bugs":{"url":"https://github.com/stream-utils/stream-to-array/issues"},"homepage":"https://github.com/stream-utils/stream-to-array","_id":"stream-to-array@2.0.1","_shasum":"a5a95b00082ae5452ce7accfa4b8fd4a247dfaa5","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"dist":{"shasum":"a5a95b00082ae5452ce7accfa4b8fd4a247dfaa5","tarball":"https://registry.npmjs.org/stream-to-array/-/stream-to-array-2.0.1.tgz","integrity":"sha512-h5Y2mV5zlfVJOhnbyRXiR87Gse5dej8yGmz4tBMDz1398Wbe5t1PEsBD1cNGnP0csxjLLgkwVz83Y5MVftXw/w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjkKpsUN14W24RaA0cjB4ivjEFT6iIJ+P+uSpZaM5DgAIhAJXvq71d2IUVaxkxao9AGPQggPv7uEA9/ZAZJEzrYxfw"}]},"directories":{}},"2.0.2":{"name":"stream-to-array","description":"Concatenate a readable stream's data into a single array","version":"2.0.2","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/stream-utils/stream-to-array"},"dependencies":{"bluebird":"2","native-or-bluebird":"1"},"devDependencies":{"mocha":"1","istanbul":"0"},"scripts":{"test":"mocha --reporter spec --bail","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"files":["index.js"],"keywords":["stream","streams","buffer","array","concat"],"gitHead":"2e837fe2dd470b6beda42a518c69e7a35a625194","bugs":{"url":"https://github.com/stream-utils/stream-to-array/issues"},"homepage":"https://github.com/stream-utils/stream-to-array","_id":"stream-to-array@2.0.2","_shasum":"68b006bb494614fb2ba198336c0192f8c2679c24","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"dist":{"shasum":"68b006bb494614fb2ba198336c0192f8c2679c24","tarball":"https://registry.npmjs.org/stream-to-array/-/stream-to-array-2.0.2.tgz","integrity":"sha512-xcJQ/2ZNp7NqVdKVSsqF354nEo5ZLAlPd3i/W8eG08KGzmKSqCgx3p5QR0MPBG3igdQ14Aqb0xyj76kZs9Kllg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAuXElRnvNrLadlXqBb7xucCMD7YGa986pI5mL0wXASGAiEA4W8dqOhiyyQ9D22TxIsAOh+zopylKEr5eJ+rcu/lG+g="}]},"directories":{}},"2.1.0":{"name":"stream-to-array","description":"Concatenate a readable stream's data into a single array","version":"2.1.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/stream-utils/stream-to-array.git"},"dependencies":{"bluebird":"2","native-or-bluebird":"1"},"devDependencies":{"istanbul":"0","mocha":"^2.3.3"},"scripts":{"test":"mocha --reporter spec --bail","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"files":["index.js"],"keywords":["stream","streams","buffer","array","concat"],"gitHead":"09338d4dc6bbd904a9ae0693ec586ee7441c35c1","bugs":{"url":"https://github.com/stream-utils/stream-to-array/issues"},"homepage":"https://github.com/stream-utils/stream-to-array#readme","_id":"stream-to-array@2.1.0","_shasum":"9aff24094f58b6d600c3c06297f9ab7fb9ba3ee0","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"dist":{"shasum":"9aff24094f58b6d600c3c06297f9ab7fb9ba3ee0","tarball":"https://registry.npmjs.org/stream-to-array/-/stream-to-array-2.1.0.tgz","integrity":"sha512-BhFCAxeuWtl0XBbwgiBigdXS2k+NphOkKiHKemL4E9z299wjPl/PqXjTyrPceyZ9qUIALH5WK1+Q5XQayNE7Ig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCN4mFW9/wdoZaaqO2DZJFvpykFyKsk1K5/26SGPkX4lAIgSNDub6LxL7NnwavPJ9kvfzWuss8eRvzeLDcFq0L+bYg="}]},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"directories":{}},"2.2.0":{"name":"stream-to-array","description":"Concatenate a readable stream's data into a single array","version":"2.2.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/stream-utils/stream-to-array.git"},"dependencies":{"native-or-bluebird":"1"},"devDependencies":{"bluebird":"2","istanbul":"0","mocha":"^2.3.3"},"scripts":{"test":"mocha --reporter spec --bail","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"files":["index.js"],"keywords":["stream","streams","buffer","array","concat"],"gitHead":"c9ddaf02b7e4f8504e9cc1ff42cd5d1fddbb5c0d","bugs":{"url":"https://github.com/stream-utils/stream-to-array/issues"},"homepage":"https://github.com/stream-utils/stream-to-array#readme","_id":"stream-to-array@2.2.0","_shasum":"357a7cdab1e0462c9bc4ea15b461b1378245d3bc","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"dist":{"shasum":"357a7cdab1e0462c9bc4ea15b461b1378245d3bc","tarball":"https://registry.npmjs.org/stream-to-array/-/stream-to-array-2.2.0.tgz","integrity":"sha512-os0yaid0FafA9eOC30pNIsRv2vyMdk2iqVobp0gWbhvB0XD0+OcCdsxCUbwupt1AfKorr7sNhhUkIRbCzr7BPA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGq0Yt9MqqjEivOmdQjhFT+Gd9XD2WDo46k9w7ER8krXAiBKWjcBjuu7kBBmHi7qyjj0ywWf8X/faeF7sNj07zNd8Q=="}]},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"directories":{}},"2.2.1":{"name":"stream-to-array","description":"Concatenate a readable stream's data into a single array","version":"2.2.1","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/stream-utils/stream-to-array.git"},"dependencies":{"native-or-bluebird":"1"},"devDependencies":{"bluebird":"^3.1.1","istanbul":"0","mocha":"^2.3.3","trycatch":"^1.5.21"},"scripts":{"test":"mocha --reporter spec --bail","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"files":["index.js"],"keywords":["stream","streams","buffer","array","concat"],"gitHead":"d6478ccf9dae38cad957aca298e4b92216148c28","bugs":{"url":"https://github.com/stream-utils/stream-to-array/issues"},"homepage":"https://github.com/stream-utils/stream-to-array#readme","_id":"stream-to-array@2.2.1","_shasum":"08661492bbd02bf38ce6cb880144c83f2abd07a9","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.2.4","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"dist":{"shasum":"08661492bbd02bf38ce6cb880144c83f2abd07a9","tarball":"https://registry.npmjs.org/stream-to-array/-/stream-to-array-2.2.1.tgz","integrity":"sha512-0tUyKffuEa9HoMVIyiG/Vi9XDFyIlhZU3nZSzEfrhu3V7kC65hLkYviC5kGljt7sgoeEHBG1hoOEKjESaDsdVg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGeg10TRFPCSeeJdEJzTQQhJOXoCCyQAvjeD6PxYvG5wIhAIXi6bYVbCImq2Pt5GDhOVEW2uCCv7MfgaBjcwwkMomi"}]},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"directories":{}},"2.3.0":{"name":"stream-to-array","description":"Concatenate a readable stream's data into a single array","version":"2.3.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/stream-utils/stream-to-array.git"},"dependencies":{"any-promise":"^1.1.0"},"devDependencies":{"bluebird":"^3.1.1","istanbul":"^0.4.2","mocha":"^2.3.3"},"scripts":{"test":"mocha --reporter spec --bail","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"files":["index.js"],"keywords":["stream","streams","buffer","array","concat"],"gitHead":"e22b0b2719dc19c70a94a73081590cf2892dc0ba","bugs":{"url":"https://github.com/stream-utils/stream-to-array/issues"},"homepage":"https://github.com/stream-utils/stream-to-array#readme","_id":"stream-to-array@2.3.0","_shasum":"bbf6b39f5f43ec30bc71babcb37557acecf34353","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.1","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"dist":{"shasum":"bbf6b39f5f43ec30bc71babcb37557acecf34353","tarball":"https://registry.npmjs.org/stream-to-array/-/stream-to-array-2.3.0.tgz","integrity":"sha512-UsZtOYEn4tWU2RGLOXr/o/xjRBftZRlG3dEWoaHr8j4GuypJ3isitGbVyjQKAuMu+xbiop8q224TjiZWc4XTZA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICuj2PkATWO7Gn6ng+wYVwhP69VTENN+4peEXiWLd2c6AiA52iZ/1VWWiXV/jXORt05/xhVbyD3cBIe/mRUDE5GTHQ=="}]},"maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"dougwilson","email":"doug@somethingdoug.com"}],"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/stream-to-array-2.3.0.tgz_1456626126387_0.17467772774398327"},"directories":{}}},"readme":"# Stream to Array\n\n[![NPM version][npm-image]][npm-url]\n[![Build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![Dependency Status][david-image]][david-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\nConcatenate a readable stream's data into a single array.\n\nYou may also be interested in:\n\n- [raw-body](https://github.com/stream-utils/raw-body) for strings\n\n## API\n\n```js\nvar toArray = require('stream-to-array')\n```\n\n### toArray([stream], [callback(err, arr)])\n\nReturns all the data objects in an array.\nThis is useful for streams in object mode if you want to just use an array.\n\n```js\nvar stream = new Stream.Readable()\ntoArray(stream, function (err, arr) {\n  assert.ok(Array.isArray(arr))\n})\n```\n\nIf `stream` is not defined, it is assumed that `this` is a stream.\n\n```js\nvar stream = new Stream.Readable()\nstream.toArray = toArray\nstream.toArray(function (err, arr) {\n\n})\n```\n\nIf `callback` is not defined, then it returns a promise.\n\n```js\ntoArray(stream)\n  .then(function (parts) {\n\n  })\n```\n\nIf you want to return a buffer, just use `Buffer.concat(arr)`\n\n```js\ntoArray(stream)\n  .then(function (parts) {\n    var buffers = []\n    for (var i = 0, l = parts.length; i < l ; ++i) {\n      var part = parts[i]\n      buffers.push((part instanceof Buffer) ? part : new Buffer(part))\n    }\n    return Buffer.concat(buffers)\n  })\n```\n\n[npm-image]: https://img.shields.io/npm/v/stream-to-array.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/stream-to-array\n[github-tag]: http://img.shields.io/github/tag/stream-utils/stream-to-array.svg?style=flat-square\n[github-url]: https://github.com/stream-utils/stream-to-array/tags\n[travis-image]: https://img.shields.io/travis/stream-utils/stream-to-array.svg?style=flat-square\n[travis-url]: https://travis-ci.org/stream-utils/stream-to-array\n[coveralls-image]: https://img.shields.io/coveralls/stream-utils/stream-to-array.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/stream-utils/stream-to-array?branch=master\n[david-image]: http://img.shields.io/david/stream-utils/stream-to-array.svg?style=flat-square\n[david-url]: https://david-dm.org/stream-utils/stream-to-array\n[license-image]: http://img.shields.io/npm/l/stream-to-array.svg?style=flat-square\n[license-url]: LICENSE\n[downloads-image]: http://img.shields.io/npm/dm/stream-to-array.svg?style=flat-square\n[downloads-url]: https://npmjs.org/package/stream-to-array\n","maintainers":[{"email":"sindresorhus@gmail.com","name":"sindresorhus"},{"email":"doug@somethingdoug.com","name":"dougwilson"},{"email":"jonathanrichardong@gmail.com","name":"jongleberry"}],"time":{"modified":"2023-11-07T07:17:36.588Z","created":"2013-12-04T10:24:12.917Z","1.0.0":"2013-12-04T10:24:13.851Z","2.0.0":"2014-07-11T23:56:42.057Z","2.0.1":"2014-08-29T19:19:49.711Z","2.0.2":"2014-08-29T20:13:00.348Z","2.1.0":"2015-10-21T05:26:50.057Z","2.2.0":"2015-11-05T18:01:03.514Z","2.2.1":"2016-01-14T07:59:14.577Z","2.3.0":"2016-02-28T02:22:07.458Z"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"git+https://github.com/stream-utils/stream-to-array.git"},"homepage":"https://github.com/stream-utils/stream-to-array#readme","bugs":{"url":"https://github.com/stream-utils/stream-to-array/issues"},"license":"MIT","readmeFilename":"README.md","keywords":["stream","streams","buffer","array","concat"],"users":{"rsp":true,"amio":true,"n370":true,"level9i":true,"drewigg":true}}