{"name":"collect-all","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"1.0.4","description":"Returns a stream which becomes readable once all input is received","repository":{"type":"git","url":"git+https://github.com/75lb/collect-all.git"},"license":"MIT","main":"./lib/collect-all.js","keywords":["concat","stream","collect","buffers","concentate"],"engines":{"node":">=0.10.0"},"scripts":{"test":"tape test/*.js","docs":"jsdoc2md -t jsdoc2md/README.hbs lib/*.js > README.md; echo","cover":"istanbul cover ./node_modules/.bin/tape test/*.js && cat coverage/lcov.info | ./node_modules/.bin/coveralls && rm -rf coverage; echo"},"dependencies":{"stream-connect":"^1.0.2","stream-via":"^1.0.4"},"devDependencies":{"coveralls":"^2.13.1","jsdoc-to-markdown":"^3.0.0","tape":"^4.6.3"},"gitHead":"93630719d84894d5b78eb6ff40b22506b7afcaf9","bugs":{"url":"https://github.com/75lb/collect-all/issues"},"homepage":"https://github.com/75lb/collect-all#readme","_id":"collect-all@1.0.4","_nodeVersion":"14.10.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-RKZhRwJtJEP5FWul+gkSMEnaK6H3AGPTTWOiRimCcs+rc/OmQE3Yhy1Q7A7KsdkG3ZXVdZq68Y6ONSdvkeEcKA==","shasum":"50cd7119ac24b8e12a661f0f8c3aa0ea7222ddfc","tarball":"http://registry-npm.ywwl.com/collect-all/download/collect-all-1.0.4.tgz","fileCount":9,"unpackedSize":10409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfb0xhCRA9TVsSAnZWagAA7hIP+gL2OGy5ONmLrnamzkU5\n4dNf6ze4QTNPfxhji8kdRUUqc1CyDzGFiqTuitlRYXfgxKEU6sEDrHkamOPp\nhMJk7ono235lNurvQaDLEFkn7U0+U/uA8lUrI2QNElS2CrADTQjMP0wZsSrx\nvOIhhcsym63kJa2Awd2fpSw4WgM6d+Q9J8VTrmvWCvibmYiYyM87Fgmacy24\n0/LOt95uRgixH0e9FRk74S/kSC7BVgwPDwBSdUX7/4EHExhmt6LaLWUEvQxa\n40epH/1WBl85aj87GJIpp+jzZlTArVWL+2U7hrtOEoDKs+qlkmzN+uh6jVpT\nDjFR2NGqfz5FxiCrbtwOp3Blaq0CHqOrA5E+aHP55nY/gHNhjiv9s41zoDjH\nQCojjJHsoNjfViQUTa7fiSun7N3myzQkmwpnoVpCSp25JHepjaRF/KTAUuju\n0RONeiYEnMNNLVKcVVEfkcoQopYjuxWAM5Bx0I2MHKFe8ZI9h2wghrD0b2Ie\nN18G+KoP8ldtt3Ef6/rRRYjkgbsHkV+1+NP2LWo2dkohV8IABARwnh8UJa3D\nvp4zQP/3WL4qYgt6DoBJ0zJEz/Y/F1BRe7ZUvH6mKRNH6wklXonkqdGnmEwt\nOuhh0kQeNZUQ86LKP3bsP02XpnL5XJwfBD1ey493gETYtjdRXOP1n0ajF3jc\nEg66\r\n=GNuy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFhrkSPMHDV/SEwfFd17MpYLg5WIU8p8QRcgRkpxmAG2AiBTYjYgZEox3LHpBw2VaJlQ0VkmiwUGYcxEMXVHC8sflw=="}],"size":3547,"noattachment":false,"key":"/collect-all/-/collect-all-1.0.4.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/collect-all_1.0.4_1601129568574_0.3082668642206212"},"_hasShrinkwrap":false,"readme":"[![view on npm](https://img.shields.io/npm/v/collect-all.svg)](https://www.npmjs.org/package/collect-all)\n[![npm module downloads](https://img.shields.io/npm/dt/collect-all.svg)](https://www.npmjs.org/package/collect-all)\n[![Build Status](https://travis-ci.org/75lb/collect-all.svg?branch=master)](https://travis-ci.org/75lb/collect-all)\n[![Dependency Status](https://david-dm.org/75lb/collect-all.svg)](https://david-dm.org/75lb/collect-all)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)\n\n<a name=\"module_collect-all\"></a>\n\n***DEPRECATED. This package has been replaced by [stream-read-all](https://github.com/75lb/stream-read-all) which does the same job but with a Promises interface.***\n\n\n## collect-all\nReturns a stream which fires a callback and becomes readable once all input is received.\n\nBy default the callback is invoked with a Buffer instance containing all concatenated input. If you set the option `{ objectMode: true }` the callback is invoked with an array containing all objects received.\n\n<a name=\"exp_module_collect-all--collectAll\"></a>\n\n### collectAll([callback], [options]) ⇒ [<code>Duplex</code>](https://nodejs.org/api/stream.html#stream_class_stream_duplex) ⏏\n**Kind**: Exported function\n\n| Param | Type | Description |\n| --- | --- | --- |\n| [callback] | <code>function</code> | Called once with the collected input data (by default a `Buffer` instance, or array in `objectMode`.). The value returned by this callback function will be passed downstream. |\n| [options] | <code>object</code> | [Stream options](https://nodejs.org/dist/latest-v5.x/docs/api/stream.html#stream_new_stream_readable_options) object, passed to the constructor for the stream returned by `collect-all`. If the callback function supplied returns a non-string/buffer value, set `options.objectMode` to `true`. |\n\n**Example**\nAn example command-line client script - string input received at stdin is stamped with `received` then written to  stdout.\n```js\nvar collectAll = require('collect-all')\nprocess.stdin\n  .pipe(collectAll(function (input) {\n    input = 'received: ' + input\n    return input\n  }))\n  .pipe(process.stdout)\n```\n\nAn object-mode example:\n```js\nvar collectAll = require('collect-all')\n\nfunction onAllCollected (collected) {\n  console.log('Objects collected: ' + collected.length)\n}\n\nvar stream = collectAll(onAllCollected, { objectMode: true })\nstream.write({})\nstream.write({})\nstream.end({}) // outputs 'Objects collected: 3'\n```\n\n* * *\n\n&copy; 2015-17 Lloyd Brookes \\<75pound@gmail.com\\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).\n","publish_time":1601129568748,"_cnpm_publish_time":1601129568748,"dist-tags":{"latest":"1.0.4"}}