{"_id":"stream-spigot","_rev":"72681","name":"stream-spigot","description":"A readable stream generator, useful for testing or converting simple functions into Readable streams.","dist-tags":{"latest":"3.0.6"},"maintainers":[{"name":"bryce","email":""}],"time":{"modified":"2021-06-03T10:23:48.000Z","created":"2013-07-04T00:37:30.408Z","3.0.6":"2017-03-28T15:33:52.079Z","3.0.5":"2015-01-23T20:52:01.588Z","3.0.4":"2014-06-04T17:48:44.658Z","3.0.3":"2014-01-10T18:40:25.162Z","3.0.2":"2013-12-18T05:14:28.688Z","3.0.1":"2013-10-26T20:36:55.944Z","3.0.0":"2013-10-16T20:08:29.675Z","2.1.2":"2013-09-21T20:26:38.409Z","2.1.1":"2013-08-14T21:11:55.613Z","2.1.0":"2013-08-14T21:05:15.192Z","2.0.0":"2013-07-21T19:48:40.814Z","1.0.0":"2013-07-04T00:37:30.408Z"},"users":{"jden":true,"ktmud":true,"alexgo":true,"shanewholloway":true,"bret":true,"evanoxfeld":true,"digital-owl":true,"jsdnxx":true},"author":{"name":"Bryce B. Baril"},"repository":{"type":"git","url":"git+https://github.com/brycebaril/node-stream-spigot.git"},"versions":{"3.0.6":{"name":"stream-spigot","version":"3.0.6","description":"A readable stream generator, useful for testing or converting simple functions into Readable streams.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/brycebaril/node-stream-spigot.git"},"directories":{"test":"test"},"scripts":{"test":"node test/"},"browser":{"readable-stream/readable":"_stream_readable"},"keywords":["streams2","testing","readable"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"concat-stream":"~1.6.0","tape":"~4.6.3"},"dependencies":{"readable-stream":"~2.2.6","xtend":"~4.0.0"},"gitHead":"adb93c2772a57d03b09b53b771ac0dd8498af722","bugs":{"url":"https://github.com/brycebaril/node-stream-spigot/issues"},"homepage":"https://github.com/brycebaril/node-stream-spigot#readme","_id":"stream-spigot@3.0.6","_shasum":"df87da2630221682b13d94f1ef63ae56a4d7cefa","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"dist":{"shasum":"df87da2630221682b13d94f1ef63ae56a4d7cefa","size":3235,"noattachment":false,"key":"/stream-spigot/-/stream-spigot-3.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-spigot/download/stream-spigot-3.0.6.tgz"},"maintainers":[{"name":"bryce","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/stream-spigot-3.0.6.tgz_1490715231756_0.5148435421288013"},"publish_time":1490715232079,"_hasShrinkwrap":false,"_cnpm_publish_time":1490715232079},"3.0.5":{"name":"stream-spigot","version":"3.0.5","description":"A readable stream generator, useful for testing or converting simple functions into Readable streams.","main":"index.js","repository":{"type":"git","url":"https://github.com/brycebaril/node-stream-spigot"},"directories":{"test":"test"},"scripts":{"test":"node test/"},"browser":{"readable-stream/readable":"_stream_readable"},"keywords":["streams2","testing","readable"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"concat-stream":"~1.4.7","tape":"~3.4.0"},"dependencies":{"readable-stream":"~1.1.0","xtend":"~4.0.0"},"gitHead":"381c7349483bb0fd33a5537e8fe8301e233b39e1","bugs":{"url":"https://github.com/brycebaril/node-stream-spigot/issues"},"homepage":"https://github.com/brycebaril/node-stream-spigot","_id":"stream-spigot@3.0.5","_shasum":"6186a2b4e0a01dc7c8dbc9745fc667cae6c33b41","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"maintainers":[{"name":"bryce","email":""}],"dist":{"shasum":"6186a2b4e0a01dc7c8dbc9745fc667cae6c33b41","size":3250,"noattachment":false,"key":"/stream-spigot/-/stream-spigot-3.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-spigot/download/stream-spigot-3.0.5.tgz"},"publish_time":1422046321588,"_cnpm_publish_time":1422046321588,"_hasShrinkwrap":false},"3.0.4":{"name":"stream-spigot","version":"3.0.4","description":"A readable stream generator, useful for testing or converting simple functions into Readable streams.","main":"index.js","repository":{"type":"git","url":"https://github.com/brycebaril/node-stream-spigot"},"directories":{"test":"test"},"scripts":{"test":"node test/"},"browser":{"readable-stream/readable":"_stream_readable"},"keywords":["streams2","testing","readable"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"concat-stream":"~1.4.6","tape":"~2.13.2"},"dependencies":{"readable-stream":"~1.0.27-1","xtend":"~3.0.0"},"bugs":{"url":"https://github.com/brycebaril/node-stream-spigot/issues"},"homepage":"https://github.com/brycebaril/node-stream-spigot","_id":"stream-spigot@3.0.4","_shasum":"d5685df13ff58140d4d2d6f173c4f00e068fa5c6","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"maintainers":[{"name":"bryce","email":""}],"dist":{"shasum":"d5685df13ff58140d4d2d6f173c4f00e068fa5c6","size":3237,"noattachment":false,"key":"/stream-spigot/-/stream-spigot-3.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-spigot/download/stream-spigot-3.0.4.tgz"},"publish_time":1401904124658,"_cnpm_publish_time":1401904124658,"_hasShrinkwrap":false},"3.0.3":{"name":"stream-spigot","version":"3.0.3","description":"A readable stream generator, useful for testing or converting simple functions into Readable streams.","main":"index.js","repository":{"type":"git","url":"https://github.com/brycebaril/node-stream-spigot"},"directories":{"test":"test"},"scripts":{"test":"node test/"},"browser":{"readable-stream/readable":"_stream_readable"},"keywords":["streams2","testing","readable"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"concat-stream":"~1.4.1","tape":"~2.3.2"},"dependencies":{"readable-stream":"~1.1.10","xtend":"~2.1.2"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/brycebaril/node-stream-spigot/issues"},"homepage":"https://github.com/brycebaril/node-stream-spigot","_id":"stream-spigot@3.0.3","dist":{"shasum":"d69b961a4e7c288a5cf55d28cd3e8552c6e215f3","size":3242,"noattachment":false,"key":"/stream-spigot/-/stream-spigot-3.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-spigot/download/stream-spigot-3.0.3.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"maintainers":[{"name":"bryce","email":""}],"publish_time":1389379225162,"_hasShrinkwrap":false,"_cnpm_publish_time":1389379225162},"3.0.2":{"name":"stream-spigot","version":"3.0.2","description":"A readable stream generator, useful for testing or converting simple functions into Readable streams.","main":"index.js","repository":{"type":"git","url":"https://github.com/brycebaril/node-stream-spigot"},"directories":{"test":"test"},"scripts":{"test":"node test/"},"browser":{"readable-stream/readable":"_stream_readable"},"keywords":["streams2","testing","readable"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"concat-stream":"~1.2.1","tape":"~2.3.2"},"dependencies":{"readable-stream":"~1.1.9","xtend":"~2.1.1"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/brycebaril/node-stream-spigot/issues"},"homepage":"https://github.com/brycebaril/node-stream-spigot","_id":"stream-spigot@3.0.2","dist":{"shasum":"5d890903d076746da493d80b2f7870c8aba75de2","size":3227,"noattachment":false,"key":"/stream-spigot/-/stream-spigot-3.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-spigot/download/stream-spigot-3.0.2.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"maintainers":[{"name":"bryce","email":""}],"publish_time":1387343668688,"_hasShrinkwrap":false,"_cnpm_publish_time":1387343668688},"3.0.1":{"name":"stream-spigot","version":"3.0.1","description":"A readable stream generator, useful for testing or converting simple functions into Readable streams.","main":"index.js","repository":{"type":"git","url":"https://github.com/brycebaril/node-stream-spigot"},"directories":{"test":"test"},"scripts":{"test":"node test/"},"keywords":["streams2","testing","readable"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"concat-stream":"~1.0.1","tape":"~2.1.0"},"dependencies":{"readable-stream":"~1.1.9","xtend":"~2.1.1"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/brycebaril/node-stream-spigot/issues"},"_id":"stream-spigot@3.0.1","dist":{"shasum":"bd5f5d6d44aee44def8d01d4c6fe7c5aadacdb88","size":3210,"noattachment":false,"key":"/stream-spigot/-/stream-spigot-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-spigot/download/stream-spigot-3.0.1.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"maintainers":[{"name":"bryce","email":""}],"publish_time":1382819815944,"_hasShrinkwrap":false,"_cnpm_publish_time":1382819815944},"3.0.0":{"name":"stream-spigot","version":"3.0.0","description":"A readable stream generator, useful for testing or converting simple functions into Readable streams.","main":"index.js","repository":{"type":"git","url":"https://github.com/brycebaril/node-stream-spigot"},"directories":{"test":"test"},"scripts":{"test":"node test/"},"keywords":["streams2","testing","readable"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"concat-stream":"~1.0.1","tape":"~2.0.0"},"dependencies":{"readable-stream":"~1.1.9","xtend":"~2.1.1"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/brycebaril/node-stream-spigot/issues"},"_id":"stream-spigot@3.0.0","dist":{"shasum":"d13976b9fc3b8d678418b977deb3214f3b53b054","size":3209,"noattachment":false,"key":"/stream-spigot/-/stream-spigot-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-spigot/download/stream-spigot-3.0.0.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"maintainers":[{"name":"bryce","email":""}],"publish_time":1381954109675,"_hasShrinkwrap":false,"_cnpm_publish_time":1381954109675},"2.1.2":{"name":"stream-spigot","version":"2.1.2","description":"A readable stream generator, useful for testing or converting simple functions into Readable streams.","main":"index.js","repository":{"type":"git","url":"https://github.com/brycebaril/node-stream-spigot"},"directories":{"test":"test"},"scripts":{"test":"tap test/"},"keywords":["streams2","testing","readable"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"concat-stream":"~1.0.0","tap":"~0.4.3"},"dependencies":{"readable-stream":"~1.1.0"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/brycebaril/node-stream-spigot/issues"},"_id":"stream-spigot@2.1.2","dist":{"shasum":"7de145e819f8dd0db45090d13dcf73a8ed3cc035","size":3170,"noattachment":false,"key":"/stream-spigot/-/stream-spigot-2.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-spigot/download/stream-spigot-2.1.2.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"maintainers":[{"name":"bryce","email":""}],"publish_time":1379795198409,"_hasShrinkwrap":false,"_cnpm_publish_time":1379795198409},"2.1.1":{"name":"stream-spigot","version":"2.1.1","description":"A readable stream generator, useful for testing or converting simple functions into Readable streams.","main":"index.js","repository":{"type":"git","url":"https://github.com/brycebaril/node-stream-spigot"},"directories":{"test":"test"},"scripts":{"test":"tap test/"},"keywords":["streams2","testing","readable"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"concat-stream":"~1.0.0","tap":"~0.4.3"},"dependencies":{"readable-stream":"~1.0.2"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/brycebaril/node-stream-spigot/issues"},"_id":"stream-spigot@2.1.1","dist":{"shasum":"ac5231867a11f93983adfcee33a813801f2e9115","size":3165,"noattachment":false,"key":"/stream-spigot/-/stream-spigot-2.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-spigot/download/stream-spigot-2.1.1.tgz"},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"maintainers":[{"name":"bryce","email":""}],"publish_time":1376514715613,"_hasShrinkwrap":false,"_cnpm_publish_time":1376514715613},"2.1.0":{"name":"stream-spigot","version":"2.1.0","description":"A readable stream generator, useful for testing or converting simple functions into Readable streams.","main":"index.js","repository":{"type":"git","url":"https://github.com/brycebaril/node-stream-spigot"},"directories":{"test":"test"},"scripts":{"test":"tap test/"},"keywords":["streams2","testing","readable"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"concat-stream":"~1.0.0","tap":"~0.4.3"},"dependencies":{"readable-stream":"~1.0.2"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/brycebaril/node-stream-spigot/issues"},"_id":"stream-spigot@2.1.0","dist":{"shasum":"d97b17bbd6901c116d2140d08f59963ba0900309","size":3156,"noattachment":false,"key":"/stream-spigot/-/stream-spigot-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-spigot/download/stream-spigot-2.1.0.tgz"},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"maintainers":[{"name":"bryce","email":""}],"publish_time":1376514315192,"_hasShrinkwrap":false,"_cnpm_publish_time":1376514315192},"2.0.0":{"name":"stream-spigot","version":"2.0.0","description":"A readable stream generator, useful for testing or converting simple functions into Readable streams.","main":"index.js","repository":{"type":"git","url":"https://github.com/brycebaril/node-stream-spigot"},"directories":{"test":"test"},"scripts":{"test":"tap test/"},"keywords":["streams2","testing","readable"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"concat-stream":"~1.0.0","tap":"~0.4.3"},"dependencies":{"readable-stream":"~1.0.2"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/brycebaril/node-stream-spigot/issues"},"_id":"stream-spigot@2.0.0","dist":{"shasum":"31678b5723e9d690b9d74f6c064dd46b9fb4913b","size":3147,"noattachment":false,"key":"/stream-spigot/-/stream-spigot-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-spigot/download/stream-spigot-2.0.0.tgz"},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"maintainers":[{"name":"bryce","email":""}],"publish_time":1374436120814,"_hasShrinkwrap":false,"_cnpm_publish_time":1374436120814},"1.0.0":{"name":"stream-spigot","version":"1.0.0","description":"A readable stream generator, mostly useful for testing.","main":"index.js","repository":{"type":"git","url":"https://github.com/brycebaril/node-stream-spigot"},"directories":{"test":"test"},"scripts":{"test":"tap test/"},"keywords":["streams2","testing","readable"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"concat-stream":"~1.0.0","tap":"~0.4.3"},"dependencies":{"readable-stream":"~1.0.2"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/brycebaril/node-stream-spigot/issues"},"_id":"stream-spigot@1.0.0","dist":{"shasum":"53784945a558f3926444e9c3a57a121537889119","size":3325,"noattachment":false,"key":"/stream-spigot/-/stream-spigot-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/stream-spigot/download/stream-spigot-1.0.0.tgz"},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"maintainers":[{"name":"bryce","email":""}],"publish_time":1372898250408,"_hasShrinkwrap":false,"_cnpm_publish_time":1372898250408}},"readme":"Stream Spigot\n=============\n\n[![NPM](https://nodei.co/npm/stream-spigot.png)](https://nodei.co/npm/stream-spigot/)\n\n[![david-dm](https://david-dm.org/brycebaril/node-stream-spigot.png)](https://david-dm.org/brycebaril/node-stream-spigot/)\n[![david-dm](https://david-dm.org/brycebaril/node-stream-spigot/dev-status.png)](https://david-dm.org/brycebaril/node-stream-spigot#info=devDependencies/)\n\n\nA generator for (streams2) Readable streams, useful for testing or converting simple lazy functions into Readable streams, or just creating Readable streams without all the boilerplate.\n\n```javascript\nvar spigot = require(\"stream-spigot\")\n\nspigot.array([\"ABCDEFG\"]).pipe(process.stdout)\n// ABCDEFG\n\nspigot.array([\"ABC\", \"DEF\", \"G\"]).pipe(process.stdout)\n// same as: (short form)\nspigot([\"ABC\", \"DEF\", \"G\"]).pipe(process.stdout)\n// ABCDEFG\n\n\n// Create a stream out of a synchronous generator:\nvar count = 0\nfunction gen() {\n  if (count++ < 5) {\n    return {val: count}\n  }\n}\n\nspigot.sync({objectMode: true}, gen).pipe(...)\n/*\n{val: 1}\n{val: 2}\n{val: 3}\n{val: 4}\n{val: 5}\n*/\n\n\n// Create a more traditional Readable stream:\nvar source = spigot({objectMode: true}, function () {\n  var self = this\n  iterator.next(function (err, value) {\n    if (err) return self.emit(\"error\", err)\n    self.push(value)\n  })\n})\n\nsource.pipe(...)\n\n```\n\nUsage\n=====\n\nspigot([options,] _read)\n---\n\nCreate a Readable stream instance with the specified _read method. Your _read method should follow the normal [stream.Readable _read](http://nodejs.org/api/stream.html#stream_readable_read_size_1) syntax. (I.e. it should call `this.push(chunk)`)\n\nspigot([options, ], array)\n---\n\nCreate a Readable stream instance that will emit each member of the specified array until it is consumed. Creates a copy of the given array and consumes that -- if this will cause memory issues, consider implementing your own _read function to consume your array.\n\nvar Spigot = spigot.ctor([options,], _read)\n---\n\nSame as the above except provides a constructor for your Readable class. You can then create instances by using either `var source = new Spigot()` or `var source = Spigot()`.\n\nvar Spigot = spigot.ctor([options,], array)\n---\n\nSame as the above except provides a constructor for your Readable class. You can then create instances by using either `var source = new Spigot()` or `var source = Spigot()`.\n\nspigot.array([options, ], array)\n---\n\nA manual version of the above to specify an array.\n\n\nspigot.sync([options,] fn)\n------------------------\n\nCreate a readable instance providing a synchronous generator function. It will internally wrap your synchronous function as an async function.\n\nOptions\n-------\n\nAccepts standard [readable-stream](http://npmjs.org/api/stream.html) options.\n\nLICENSE\n=======\n\nMIT\n","_attachments":{},"homepage":"https://github.com/brycebaril/node-stream-spigot#readme","bugs":{"url":"https://github.com/brycebaril/node-stream-spigot/issues"},"license":"MIT"}