{"_id":"pull-live","_rev":"346663","name":"pull-live","description":"construct a pull-stream for reading from a writable source, can read old records, new (live) records, or both.","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"time":{"modified":"2021-06-20T02:42:02.000Z","created":"2016-05-19T21:44:22.646Z","1.0.1":"2016-05-20T20:50:04.539Z","1.0.0":"2016-05-19T21:44:22.646Z"},"users":{},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"repository":{"type":"git","url":"git://github.com/dominictarr/pull-live.git"},"versions":{"1.0.1":{"name":"pull-live","description":"construct a pull-stream for reading from a writable source, can read old records, new (live) records, or both.","version":"1.0.1","homepage":"https://github.com/dominictarr/pull-live","repository":{"type":"git","url":"git://github.com/dominictarr/pull-live.git"},"dependencies":{"pull-cat":"^1.1.9","pull-stream":"^3.4.0"},"devDependencies":{"pull-pushable":"^2.0.0","tape":"^4.5.1"},"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","gitHead":"3101a3087029ee9503cfeb1cadc55756a5b0893c","bugs":{"url":"https://github.com/dominictarr/pull-live/issues"},"_id":"pull-live@1.0.1","_shasum":"a4ecee01e330155e9124bbbcf4761f21b38f51f5","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.11.1","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"dist":{"shasum":"a4ecee01e330155e9124bbbcf4761f21b38f51f5","size":2429,"noattachment":false,"key":"/pull-live/-/pull-live-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/pull-live/download/pull-live-1.0.1.tgz"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/pull-live-1.0.1.tgz_1463777404101_0.207167784916237"},"directories":{},"publish_time":1463777404539,"_cnpm_publish_time":1463777404539,"_hasShrinkwrap":false},"1.0.0":{"name":"pull-live","description":"construct a pull-stream for reading from a writable source, can read old records, new (live) records, or both.","version":"1.0.0","homepage":"https://github.com/dominictarr/pull-live","repository":{"type":"git","url":"git://github.com/dominictarr/pull-live.git"},"dependencies":{"pull-cat":"^1.1.9","pull-stream":"^3.4.0"},"devDependencies":{},"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","gitHead":"59916ef1789ef0be1d0f9bd3993821b31458ed0f","bugs":{"url":"https://github.com/dominictarr/pull-live/issues"},"_id":"pull-live@1.0.0","_shasum":"66d730f8fea037d66b99bfacf1fbbddfd19ae70d","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.11.1","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"dist":{"shasum":"66d730f8fea037d66b99bfacf1fbbddfd19ae70d","size":2113,"noattachment":false,"key":"/pull-live/-/pull-live-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pull-live/download/pull-live-1.0.0.tgz"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/pull-live-1.0.0.tgz_1463694261975_0.16251699510030448"},"directories":{},"publish_time":1463694262646,"_cnpm_publish_time":1463694262646,"_hasShrinkwrap":false}},"readme":"# pull-live\n\nconstruct a pull-stream for reading from a writable source,\ncan read old records, new (live) records, or both.\n\nto be used by [pull-level](https://github.com/pull-stream/pull-level), \n[multiblobs](https://github.com/dominictarr/multiblob), and\n[secure-scuttlebutt](https://github.com/ssbc/secure-scuttlebutt).\n`pull-live` is generic, and easy to adapt to a new case.\n\n## api: createLive(createSource(opts), createLive(opts)) => createLiveStream(opts)\n\n\ncreateLive takes two functions, `createSource` (which returns a source\nstream of the stored data) and `createLive` which returns a stream\nof the live data. A function that takes `opts` and is returned.\n\nif `opts.live` is set to true, the stream will only read the old data\n(from `createSource`) and then the new data (from `createLive`) with\none item `{sync: true}` to mark when the old data has finished.\n\nIf `opts.sync === false` then the sync item will dropped.\n\nif `opts.live` is  true (default: `false`) the live data is included.\nif `opts.old` is false (default: `true`) the output will not include\nthe old data. If `live` and `old` are both false, an error is thrown.\n\nthe only valid options are `{live: true, old: false}` `{live: false, old: true}`\nand `{live: true, old: true}`\n\nI recomment using [pull-notify](https://github.com/pull-stream/pull-notify)\nto implement `createLive`.\n\n``` js\nvar MyLiveStream = createLive(createSource, createLive)\n\npull(MyLiveStrea({live:..., old:...}),...)\n```\n\n\n## License\n\nMIT\n\n\n\n\n","_attachments":{},"homepage":"https://github.com/dominictarr/pull-live","bugs":{"url":"https://github.com/dominictarr/pull-live/issues"},"license":"MIT"}