{"_id":"pull-delayed-sink","_rev":"4665280","name":"pull-delayed-sink","description":"create a sink stream, and start it later","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"nopersonsmodules","email":"nopersonsmodules@gmail.com"}],"time":{"modified":"2026-04-10T22:36:53.000Z","created":"2014-05-11T19:07:18.734Z","1.0.0":"2014-05-11T19:07:18.734Z"},"users":{},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"repository":{"type":"git","url":"git://github.com/dominictarr/pull-delayed-sink.git"},"versions":{"1.0.0":{"name":"pull-delayed-sink","description":"create a sink stream, and start it later","version":"1.0.0","homepage":"https://github.com/dominictarr/pull-delayed-sink","repository":{"type":"git","url":"git://github.com/dominictarr/pull-delayed-sink.git"},"dependencies":{},"devDependencies":{"tape":"~2.12.3","pull-stream":"~2.23.0"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","bugs":{"url":"https://github.com/dominictarr/pull-delayed-sink/issues"},"_id":"pull-delayed-sink@1.0.0","_shasum":"075ce8f7d4e28d0c938469c6d7d453f191dfa9be","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"nopersonsmodules","email":"nopersonsmodules@gmail.com"}],"dist":{"shasum":"075ce8f7d4e28d0c938469c6d7d453f191dfa9be","size":1840,"noattachment":false,"key":"/pull-delayed-sink/-/pull-delayed-sink-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pull-delayed-sink/download/pull-delayed-sink-1.0.0.tgz"},"directories":{},"publish_time":1399835238734,"_hasShrinkwrap":false,"_cnpm_publish_time":1399835238734,"_cnpmcore_publish_time":"2021-12-16T17:44:52.144Z"}},"readme":"# pull-delayed-sink\n\nreturn a pull-stream sink, that won't start reading until you say.\n\n## Example\n\n``` js\nvar delayed = require('pull-delayed-sink')\nvar feed = [], d\n\n//create a pull stream, and direct to nowhere yet!\npull(pull.values(feed), d = delayed())\n\n\n//... later, start the sink.\nsetTimeout(function () {\n  feed.push(1, 2, 3)\n\n  l.start(pull.collect(function (err, ary) {\n    if(err) throw err\n    t.deepEqual(ary, [1, 2, 3])\n    t.end()\n  }))\n})\n\n```\n\n`pull.defer` is a similar function, but it's a source instead of a sink.\n\n\n## API\n\n### d = delayed(); d.start(sink)\n\ncreate a fake sink stream, and then start it when you have the sink you want.\n\n### d = delayed(sink); d.start()\n\nmake a sink delay, and then allow it to start.\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/dominictarr/pull-delayed-sink","bugs":{"url":"https://github.com/dominictarr/pull-delayed-sink/issues"},"license":"MIT"}