{"bugs":{"url":"https://github.com/creationix/push-to-pull/issues"},"dist":{"shasum":"286e9aa1dff65f40359a1158a5e57a5c8388bd8d","tarball":"https://registry.npmjs.org/push-to-pull/-/push-to-pull-0.1.0.tgz","integrity":"sha512-OQiexFo/0h12NMqFk9cYg7ljakO+IkxkdxJad6rlclo5XcXT9Cv8r+z5K+aTZdcRfmIwbYAJoYsjiFqKl7MWRw==","signatures":[{"sig":"MEUCIEOQYU5OHvXM09F/6BQVWuFSklatI6UKPQu8crtO/Q2lAiEA1SO7rZro1U5RSqXwbMeZExfjQcJ7x5jAJMG7fbcztu4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"transform.js","name":"push-to-pull","_from":".","author":{"name":"Tim Caswell","email":"tim@creationix.com"},"readme":"push-to-pull\n============\n\nConvert a push-filter to a pull-filter (for simple streams)\n\nUsage is simple.  Define your filter as an `(emit) -> emit` transform where `emit` is `(err, item)`.  Then when you need an `(stream) -> stream` filter, use this module to convert it.\n\n```js\nvar pushToPull = require('push-to-pull');\n\n// Dumb filter that inputs numbers and outputs that many monkeys\n// Encoded as an (emit) -> emit transform filter.\nfunction pushFilter(emit) {\n  return function (item) {\n    if (item === undefined) return emit();\n    for (var i = 1; i <= item; i++) {\n      emit(\"MONKEY \" + i);\n    }  \n  }\n}\n\n// Same filter, but as a (stream) -> stream transform filter\nvar pullFilter = pushToPull(pushFilter);\n```\n","gitHead":"a31b6bc8d1233fc30a0aef6ad985b4444856962c","license":"MIT","scripts":{"test":"node test.js"},"_npmUser":{"name":"creationix","email":"tim@creationix.com"},"keywords":["simple-stream","push-filter","stream"],"repository":{"url":"git://github.com/creationix/push-to-pull.git","type":"git"},"_npmVersion":"1.2.21","description":"Convert a push-filter to a pull-filter (for simple streams)","maintainers":[{"name":"creationix","email":"tim@creationix.com"}],"readmeFilename":"README.md","_id":"push-to-pull@0.1.0","version":"0.1.0"}