{"_id":"pull-generate","_rev":"4645800","name":"pull-generate","description":"pull-stream source that produces data on state transitions","dist-tags":{"latest":"2.2.0"},"maintainers":[{"name":"npm:regular","email":""},{"name":"regular","email":"jan@lagomorph.de"}],"time":{"modified":"2026-04-10T20:15:53.000Z","created":"2015-09-05T15:07:25.315Z","2.2.0":"2015-09-09T14:18:29.986Z","2.1.0":"2015-09-09T14:10:19.199Z","2.0.2":"2015-09-08T05:15:29.121Z","2.0.1":"2015-09-08T04:55:10.555Z","2.0.0":"2015-09-07T10:09:44.872Z","1.0.1":"2015-09-05T20:50:35.151Z","1.0.0":"2015-09-05T15:07:25.315Z"},"users":{},"author":{"name":"Jan Bölsche","email":"jan@lagomorph.de","url":"http://regular.codes"},"repository":{"type":"git","url":"git+https://github.com/regular/pull-generate.git"},"versions":{"2.2.0":{"name":"pull-generate","version":"2.2.0","description":"pull-stream source that produces data on state transitions","main":"index.js","scripts":{"test":"tape test/*"},"keywords":["pull-stream","source"],"author":{"name":"Jan Bölsche","email":"jan@lagomorph.de","url":"http://regular.codes"},"license":"MIT","devDependencies":{"pull-stream":"^2.28.1","tape":"^4.2.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/regular/pull-generate.git"},"bugs":{"url":"https://github.com/regular/pull-generate/issues"},"homepage":"https://github.com/regular/pull-generate#readme","gitHead":"9b3281058f21717cac49b832823746103935bd6b","_id":"pull-generate@2.2.0","_shasum":"6d7837f0eedeabf514b347a4c3565cb19467c49c","_from":".","_npmVersion":"2.12.1","_nodeVersion":"1.8.1","_npmUser":{"name":"regular","email":"jan@lagomorph.de"},"dist":{"shasum":"6d7837f0eedeabf514b347a4c3565cb19467c49c","size":2939,"noattachment":false,"key":"/pull-generate/-/pull-generate-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pull-generate/download/pull-generate-2.2.0.tgz"},"maintainers":[{"name":"npm:regular","email":""},{"name":"regular","email":"jan@lagomorph.de"}],"publish_time":1441808309986,"_hasShrinkwrap":false,"_cnpm_publish_time":1441808309986,"_cnpmcore_publish_time":"2021-12-16T20:52:43.545Z"},"2.1.0":{"name":"pull-generate","version":"2.1.0","description":"pull-stream source that produces data on state transitions","main":"index.js","scripts":{"test":"tape test/*"},"keywords":["pull-stream","source"],"author":{"name":"Jan Bölsche","email":"jan@lagomorph.de","url":"http://regular.codes"},"license":"MIT","devDependencies":{"pull-stream":"^2.27.0","tape":"^4.2.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/regular/pull-generate.git"},"bugs":{"url":"https://github.com/regular/pull-generate/issues"},"homepage":"https://github.com/regular/pull-generate#readme","gitHead":"d0320fc592e09a2e79dcc0bceda55218fb6b3668","_id":"pull-generate@2.1.0","_shasum":"99e532c16b3fd8f73b6ac2144589e2fd2d663bac","_from":".","_npmVersion":"2.12.1","_nodeVersion":"1.8.1","_npmUser":{"name":"regular","email":"jan@lagomorph.de"},"dist":{"shasum":"99e532c16b3fd8f73b6ac2144589e2fd2d663bac","size":2940,"noattachment":false,"key":"/pull-generate/-/pull-generate-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pull-generate/download/pull-generate-2.1.0.tgz"},"maintainers":[{"name":"npm:regular","email":""},{"name":"regular","email":"jan@lagomorph.de"}],"publish_time":1441807819199,"_hasShrinkwrap":false,"_cnpm_publish_time":1441807819199,"_cnpmcore_publish_time":"2021-12-16T20:52:43.742Z"},"2.0.2":{"name":"pull-generate","version":"2.0.2","description":"pull-stream source that produces data on state transitions","main":"index.js","scripts":{"test":"tape test/*"},"keywords":["pull-stream","source"],"author":{"name":"Jan Bölsche","email":"jan@lagomorph.de","url":"http://regular.codes"},"license":"MIT","devDependencies":{"pull-stream":"^2.27.0","tape":"^4.2.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/regular/pull-generate.git"},"bugs":{"url":"https://github.com/regular/pull-generate/issues"},"homepage":"https://github.com/regular/pull-generate#readme","gitHead":"4e1b727a3ee6a48e761cfc382da237d665d0bd99","_id":"pull-generate@2.0.2","_shasum":"d826977563eb790dad911edf9231549bfce7f48e","_from":".","_npmVersion":"2.12.1","_nodeVersion":"1.8.1","_npmUser":{"name":"regular","email":"jan@lagomorph.de"},"dist":{"shasum":"d826977563eb790dad911edf9231549bfce7f48e","size":2777,"noattachment":false,"key":"/pull-generate/-/pull-generate-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/pull-generate/download/pull-generate-2.0.2.tgz"},"maintainers":[{"name":"npm:regular","email":""},{"name":"regular","email":"jan@lagomorph.de"}],"publish_time":1441689329121,"_hasShrinkwrap":false,"_cnpm_publish_time":1441689329121,"_cnpmcore_publish_time":"2021-12-16T20:52:43.957Z"},"2.0.1":{"name":"pull-generate","version":"2.0.1","description":"pull-stream source that produces data on state transitions","main":"index.js","scripts":{"test":"tape test/*"},"keywords":["pull-stream","source"],"author":{"name":"Jan Bölsche","email":"jan@lagomorph.de","url":"http://regular.codes"},"license":"MIT","devDependencies":{"pull-stream":"^2.27.0","tape":"^4.2.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/regular/pull-generate.git"},"bugs":{"url":"https://github.com/regular/pull-generate/issues"},"homepage":"https://github.com/regular/pull-generate#readme","gitHead":"7cd2ab7971b6966fe36d651fbd072d3c1579a0e3","_id":"pull-generate@2.0.1","_shasum":"127485c896f6fe1348a3ec28bfd10bfd12acf8d1","_from":".","_npmVersion":"2.12.1","_nodeVersion":"1.8.1","_npmUser":{"name":"regular","email":"jan@lagomorph.de"},"dist":{"shasum":"127485c896f6fe1348a3ec28bfd10bfd12acf8d1","size":2656,"noattachment":false,"key":"/pull-generate/-/pull-generate-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/pull-generate/download/pull-generate-2.0.1.tgz"},"maintainers":[{"name":"npm:regular","email":""},{"name":"regular","email":"jan@lagomorph.de"}],"publish_time":1441688110555,"_hasShrinkwrap":false,"_cnpm_publish_time":1441688110555,"_cnpmcore_publish_time":"2021-12-16T20:52:44.190Z"},"2.0.0":{"name":"pull-generate","version":"2.0.0","description":"pull-stream source that produces data on state transitions","main":"index.js","scripts":{"test":"tape test/*"},"keywords":["pull-stream","source"],"author":{"name":"Jan Bölsche","email":"jan@lagomorph.de","url":"http://regular.codes"},"license":"MIT","devDependencies":{"pull-stream":"^2.27.0","tape":"^4.2.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/regular/pull-generate.git"},"bugs":{"url":"https://github.com/regular/pull-generate/issues"},"homepage":"https://github.com/regular/pull-generate#readme","gitHead":"fd508cc3b9df5d583883d1add65beadcde16a729","_id":"pull-generate@2.0.0","_shasum":"48d63deeed204f8940aef1adf61f3631e345bf47","_from":".","_npmVersion":"2.12.1","_nodeVersion":"1.8.1","_npmUser":{"name":"regular","email":"jan@lagomorph.de"},"dist":{"shasum":"48d63deeed204f8940aef1adf61f3631e345bf47","size":2653,"noattachment":false,"key":"/pull-generate/-/pull-generate-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pull-generate/download/pull-generate-2.0.0.tgz"},"maintainers":[{"name":"npm:regular","email":""},{"name":"regular","email":"jan@lagomorph.de"}],"publish_time":1441620584872,"_hasShrinkwrap":false,"_cnpm_publish_time":1441620584872,"_cnpmcore_publish_time":"2021-12-16T20:52:44.377Z"},"1.0.1":{"name":"pull-generate","version":"1.0.1","description":"pull-stream source that produces data on state transitions","main":"index.js","scripts":{"test":"tape test/*"},"keywords":["pull-stream","source"],"author":{"name":"Jan Bölsche","email":"jan@lagomorph.de","url":"http://regular.codes"},"license":"MIT","devDependencies":{"pull-stream":"^2.27.0","tape":"^4.2.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/regular/pull-generate.git"},"bugs":{"url":"https://github.com/regular/pull-generate/issues"},"homepage":"https://github.com/regular/pull-generate#readme","gitHead":"85370da7ef04dbae0a64cd6b7548c38f779eb6ce","_id":"pull-generate@1.0.1","_shasum":"81980c81af03a6bf8dba5593ef3c181c5a4939fe","_from":".","_npmVersion":"2.12.1","_nodeVersion":"1.8.1","_npmUser":{"name":"regular","email":"jan@lagomorph.de"},"dist":{"shasum":"81980c81af03a6bf8dba5593ef3c181c5a4939fe","size":2639,"noattachment":false,"key":"/pull-generate/-/pull-generate-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/pull-generate/download/pull-generate-1.0.1.tgz"},"maintainers":[{"name":"npm:regular","email":""},{"name":"regular","email":"jan@lagomorph.de"}],"publish_time":1441486235151,"_hasShrinkwrap":false,"_cnpm_publish_time":1441486235151,"_cnpmcore_publish_time":"2021-12-16T20:52:44.633Z"},"1.0.0":{"name":"pull-generate","version":"1.0.0","description":"pull-stream source that produces data on state transitions","main":"index.js","scripts":{"test":"tape test/*"},"keywords":["pull-stream","source"],"author":{"name":"Jan Bölsche","email":"jan@lagomorph.de","url":"http://regular.codes"},"license":"MIT","devDependencies":{"pull-stream":"^2.27.0","tape":"^4.2.0"},"directories":{"test":"test"},"dependencies":{"pull-stream":"^2.27.0","tape":"^4.2.0"},"repository":{"type":"git","url":"git+https://github.com/regular/pull-generate.git"},"bugs":{"url":"https://github.com/regular/pull-generate/issues"},"homepage":"https://github.com/regular/pull-generate#readme","gitHead":"8b18c3b8b1cccc505cea84d8fa19a504ead02e7e","_id":"pull-generate@1.0.0","_shasum":"4c94e5e475468a0563432b3ce9461e5ee9be8ed1","_from":".","_npmVersion":"2.12.1","_nodeVersion":"1.8.1","_npmUser":{"name":"regular","email":"jan@lagomorph.de"},"dist":{"shasum":"4c94e5e475468a0563432b3ce9461e5ee9be8ed1","size":2653,"noattachment":false,"key":"/pull-generate/-/pull-generate-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pull-generate/download/pull-generate-1.0.0.tgz"},"maintainers":[{"name":"npm:regular","email":""},{"name":"regular","email":"jan@lagomorph.de"}],"publish_time":1441465645315,"_hasShrinkwrap":false,"_cnpm_publish_time":1441465645315,"_cnpmcore_publish_time":"2021-12-16T20:52:44.862Z"}},"readme":"# pull-generate\nA [pull-stream](https://github.com/dominictarr/pull-stream) source that produces data on state transitions\n\n## Simple Example\n\n``` js\nvar generate = require('pull-generate')\nvar pull = require('pull-stream')\n\npull(\n    generate(0, function(state, cb) {\n        cb(state>3 ? true : null, 1<<state, state + 1)\n    }),\n    pull.log()\n)\n\n// ==> 1 2 4 8\n```\n\n## Usage\n\n### `generate(initialState, expand [, onAbort])`\n\n- `expand`: function that is called with `initialstate` and a callback.\n  - the callback has the following signature: `callback(err, data, newState)`\n      - `err`\n        - `null` to pass `data` downstream (normal operation)\n        - `true` indicates the end of the stream\n        - everything else is treated as an error\n      - `data` is send downstream (only if err === null)\n      - `newState` is used as `state` in the next call to `expand`.\n- onAbort: optional function that is called after the stream ended\n  - is called with `null` or an error object\n\n## License\nMIT\n","_attachments":{},"homepage":"https://github.com/regular/pull-generate#readme","bugs":{"url":"https://github.com/regular/pull-generate/issues"},"license":"MIT"}