{"_id":"genny","_rev":"62-26fbf22452829504cd0ea41bc47b74eb","name":"genny","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","dist-tags":{"latest":"0.5.6"},"versions":{"0.0.1":{"name":"genny","version":"0.0.1","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","dependencies":{},"devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.0.1","dist":{"shasum":"1cb1369cc1cf2090ef9f882941eb547381a6be0d","tarball":"https://registry.npmjs.org/genny/-/genny-0.0.1.tgz","integrity":"sha512-qCoAFwQ+cZ2b0EofGNLwGus0wLbKnZhvrjWQowQSlRUuDuVLY6meQUWDdZ+bDssO3kWapd4GkKCEz9LcSytAVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwG2k3LDOwOpZ8Nhh1HuO6vUsIE/R+kjlGpqRuOxiSUAIhALV3UHhH+lRiDFOqy4lTVhL/iVs0BH+GkahKsJmrwGuC"}]},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.2.0":{"name":"genny","version":"0.2.0","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.3"},"author":{"name":"spion"},"license":"MIT","dependencies":{},"devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.2.0","dist":{"shasum":"3f1c81539b3db95e2e2dc06addeea515f203bb84","tarball":"https://registry.npmjs.org/genny/-/genny-0.2.0.tgz","integrity":"sha512-SGeJnKq8tmFSK1kTp8jTzd0PimIxFeIf/e9PWQwpUTwbTrxWvPs7eKzfAhdwJnzs3c8BR8Q16KMKBZCm+FuQiA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD01IaHDk5w1lpw/Tu2LHtAOgqbJtAQ1Z2Uc+5HbN1S9gIhAOIA3Gq/bLqgLcQadrx504f/gOhY2ggQadQLH7p0tqPA"}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.2.1":{"name":"genny","version":"0.2.1","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.3"},"author":{"name":"spion"},"license":"MIT","dependencies":{},"devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.2.1","dist":{"shasum":"c29764f37a7047c9a92e2b79f38c8253b66b43ea","tarball":"https://registry.npmjs.org/genny/-/genny-0.2.1.tgz","integrity":"sha512-HKZO03kxA6ps804bNjieM+5auVoYTM951EQDQv/VBurEAsUsROV5v6huJqNjPPe7wFX+cspoNFb39Zq9B8pjzw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHs3ylDn3qUrx51KbBrx4+GzknJG/ZCZ+cvrsuyiOKH5AiEAvY+v8wUTvOfElGyXokAsO4AV2UCFB+zt40/AicXfoeY="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.2.2":{"name":"genny","version":"0.2.2","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.3"},"author":{"name":"spion"},"license":"MIT","dependencies":{},"devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.2.2","dist":{"shasum":"0baf8d63c28a0acdf883368ac5ad355f08f04c43","tarball":"https://registry.npmjs.org/genny/-/genny-0.2.2.tgz","integrity":"sha512-MyVDBqHxKzDbEGp3rUo0USoR82Uk6aUmyonKEOeyQDI1vJkuZLPSCInTeqaigG6aTMo4VKPuPAa2OzqHIW/Oag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDxqsQd8j4V6DJrbba3ygLzjM5hVk0lvLfqoPIO3iqnkAiEA71gGpLmILU0vAuFkSwkokpOCNUKUqeJC3jTnhU/8q0Y="}]},"_from":".","_npmVersion":"1.3.4","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.2.3":{"name":"genny","version":"0.2.3","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","dependencies":{},"devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.2.3","dist":{"shasum":"6dbd3f19f52b3220336d6649e7dc781307601ac1","tarball":"https://registry.npmjs.org/genny/-/genny-0.2.3.tgz","integrity":"sha512-aY2GSyb/sikjEGJcXUnvwcz8NoPPWqbidxcRwirgZTC99IbgFlq+w1F0j+N1yo6T9KmTlzlMNWhBnhs7rGDfvA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHTX6p7GQUmMpWfIx1LSzSpkn4HntWE4nXGnRGUAbB5oAiEAtnGRtqfAFS369KC4RAQCMIKAyHaRzpHbGv3+1yFLqes="}]},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.2.4":{"name":"genny","version":"0.2.4","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","dependencies":{},"devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.2.4","dist":{"shasum":"3d06e579c133928550b1a8cdcf0c7014d9c49255","tarball":"https://registry.npmjs.org/genny/-/genny-0.2.4.tgz","integrity":"sha512-1t+hxbjxTJOrk6+SXH6luqcJ4MQXYbDHRd+/ACuce3f0xKpqYlNLx5ivqQMbZCuRzzG67ocYCpzgYijPIcj38g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNYruLGJaaGPpEHBwup6MRVJjGEytcC+4zeNNFyK/bMwIgbfRDkqv3RV9BgOQgfhtovUxOVJr+Y1UAbAcD85YeD1Q="}]},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.2.6":{"name":"genny","version":"0.2.6","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","dependencies":{},"devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.2.6","dist":{"shasum":"bfa59aa4bfd77e40d575eefb7a39a295d89dfcaf","tarball":"https://registry.npmjs.org/genny/-/genny-0.2.6.tgz","integrity":"sha512-X38k+kt1Z62ebuOwu9jEqu10BYuYjZ8Sjs6aYuFa3b57cOa/VEmTRysmDwZES7AMcDfIcS12LazxL8EWlJEgfA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICxO3hHPB6Q9ZSC7eqy+Hws3LMA6o4933Sq3U5MwrJhKAiEAuWdOc8FF4Papfb5NIiIP5xqdx3fqzz7ARICXU7wFYlY="}]},"_from":".","_npmVersion":"1.3.4","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.2.7":{"name":"genny","version":"0.2.7","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","dependencies":{},"devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.2.7","dist":{"shasum":"3a03d4d4932218a2e0548072ba68d3ac82d1779c","tarball":"https://registry.npmjs.org/genny/-/genny-0.2.7.tgz","integrity":"sha512-OXGKYqoe4iH7iJepI7bNgxbW4ofCyQzyLAWbP5FFfLpvQCv1RLBsGyxjUMqWKkbIb1tucYBr6PKhyiDcZkHPMg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMdoUB5vAmZ0KuJ52Z5EzAYEn0jo1oaf4plUCU+rvaZwIhAPNSh008Tsa2IXI2EWEwpBu6/8IdgvTb43feoE0EHTsw"}]},"_from":".","_npmVersion":"1.3.4","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.2.8":{"name":"genny","version":"0.2.8","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.2.8","dist":{"shasum":"8d6e658e4c62ecfa3d11a1071bb51ab53b8a577e","tarball":"https://registry.npmjs.org/genny/-/genny-0.2.8.tgz","integrity":"sha512-nnNSGYuh6/ykMoU6jg8agR0QctI/c/kzX/H47cuCftfbFQ5fVPsltf3q2DaNcNBcRQ+F6oPfVA+bfkP4f5+afg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyGvUblTCjulPK3MB9Knx8dCSchOtRxY9Xw90nFyQs+wIhANuCdoZ4Kb8nHb2LDnXiWjoZDtr5+YTGofSGVNAqBPnh"}]},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.3.1":{"name":"genny","version":"0.3.1","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.3.1","dist":{"shasum":"563d1bedcf32b7fddbf8e1f73044a44c041dc8df","tarball":"https://registry.npmjs.org/genny/-/genny-0.3.1.tgz","integrity":"sha512-HRQc4hhOStqThOIkkyMyYI48ERKW1/ADsinaF9XnSdEi6kimEKNjE/RZtUy36oLUa0gzPaqkL3LVJEjtlbWUSg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKAfjhNC520a6xsTUcf/dJYtWjTw9RrHh/KFnfbHSkjQIgD/dc5UVwMOS5oG14wmyBlZVbO/mrYeeFxf8mD4+K9Sw="}]},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.3.2":{"name":"genny","version":"0.3.2","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.3.2","dist":{"shasum":"db42734b70f5e8ff295ab3e57a1c5410b6ee1c42","tarball":"https://registry.npmjs.org/genny/-/genny-0.3.2.tgz","integrity":"sha512-7r3XFOsNZgw7+LPuY2VzrxH5DQkDXUusu9clJ+RDZv0VWj98ArNsXZ0xeNL2QmGuAywd1l/+RK4qfQyEB9yMkw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC+YVyhjQpgIDgiCp0dz6uHgFdsudrwm23qI5SyQEUBqAiEAs/2+KFzxglqflbRWn6+YJ0CuyG3lDoiwbpKpzfvGefo="}]},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.3.3":{"name":"genny","version":"0.3.3","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.3.3","dist":{"shasum":"63c933cdad190cf3638969eccdbc1c7794fb8f56","tarball":"https://registry.npmjs.org/genny/-/genny-0.3.3.tgz","integrity":"sha512-Erd8b0QSYvw15DIrron37JjyPcJrgTacH46R/9wvizU4thEpmQWEkE4E9HXjE+pbAgpoujkv7gYahqMnl2Cvjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHzfiHS0ZtI6m0NDeSsSb3JmwwJTXyFU0diPlHAeE/g7AiEA0sN8n7hfikwt/cR4Ml3C3+RCTyVMpYq+CJdxrHGJb20="}]},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.3.4":{"name":"genny","version":"0.3.4","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.3.4","dist":{"shasum":"952b8e7ef828712a092c9a7385eeab1cca61fcc3","tarball":"https://registry.npmjs.org/genny/-/genny-0.3.4.tgz","integrity":"sha512-PWgUa5ruyRkbJZng1WfScdUqE876Kz4TsmKITVMyM2n5g01j9QZly3JcKFgIHgrKL2zYf1TSIMBJSy8ICYhQ8g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJiDSzDPXg6YTsBlHtmWA3s4PG/81EfnURq5wXfr8D3wIgMouoUhIlzTu5ED1RMtOWMAf95l+3QRvF9YWxIB+PUcA="}]},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.3.5":{"name":"genny","version":"0.3.5","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.3.5","dist":{"shasum":"5d6fdcee1c27d6a17ac8605fea53b5f3c8abf86c","tarball":"https://registry.npmjs.org/genny/-/genny-0.3.5.tgz","integrity":"sha512-a7D9tJYhBBUEhn65OTjGTRv+lsh1OHDUsTjnZCNA6XrL/pycXji+8LXvd0R8khnWAlkbvVDEere8MOvehilXng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxxv3bEbG9JUI+Op9onZU6SKZfPHd12gSwY5QvRP6lugIgQTBUG4nSiXI1LN7cAeNAB25JRRE+aVU3JiUBjhZpO/4="}]},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.3.6":{"name":"genny","version":"0.3.6","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.3.6","dist":{"shasum":"b8a8c33fd4bf8cd754883ab20bbf4e184044e3bb","tarball":"https://registry.npmjs.org/genny/-/genny-0.3.6.tgz","integrity":"sha512-ueDft1CNIasa71d9ACmfJvAc0d6dIkvj2ukaEnRB1Vcorw6gv5ww5rwkAP3+et8J+W1EFf1Fm2OXzA3HO7AMXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIZ5uNagYlYFWylCTI0nWH3FSvhvrfXAbylRXjpf/gBAIhAIH9nBDsjdXcGMesExpPt7mXuzmNQsmG8c38CwigyaYD"}]},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.3.7":{"name":"genny","version":"0.3.7","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.3.7","dist":{"shasum":"ac0602937ca8400224fc5022e5e94c2243a3b4ed","tarball":"https://registry.npmjs.org/genny/-/genny-0.3.7.tgz","integrity":"sha512-NjWllOMLqD2CsZsT4o8/OsnQteviO0RavEs83CK/VDzB8NPKaQpAPHwf8HbNLo3UoKL4xXiF0V4JoCOw4VFNTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID9j1HOSzezgu4QCpo/ulTYcgSgq5f/cMcFghDRdUXpJAiBae7PxzNgJu8+wJhftA28QnCYGPo1oRogPBTilHBr0PA=="}]},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.4.0":{"name":"genny","version":"0.4.0","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.4.0","dist":{"shasum":"1bd16bcd75fb8e7675969a6080132b8e217bdf55","tarball":"https://registry.npmjs.org/genny/-/genny-0.4.0.tgz","integrity":"sha512-Cx3VV0vte/4YGdJvQC3KtoYGBB6Gp0wTkM8ooPbIXoxpmpe8K0vvC0yRc3PPKa3pmDlTfFkZO6M5Er8HNbNsNA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDc/KNy6Oo1aAQyfq5OMvSAV11X4TpJSk9cKOV7Frn+RAiB2FnYjns4Opbdn5H5ti3af0zfuQWVoAV8X94lKJpbMFA=="}]},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.4.1":{"name":"genny","version":"0.4.1","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.4.1","dist":{"shasum":"11483343d25626a8625191dd0ed9cb41dd47216b","tarball":"https://registry.npmjs.org/genny/-/genny-0.4.1.tgz","integrity":"sha512-8S8C/jEVrEgODPuhUHI/hlUz/iHDh6XqyWN+76QkbjBFVlWXAvzXx30tZuVeC1moU/hvwiR1T6eqrEEvAqL5Tw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGny2Z8zZ+M0ucnPCkEBoNDvh+yyfHM8fyAPtC0ckq7jAiEArM+LXH0aMU4QeHhsLQyvI96eP+pViTbDRedw+hwgmM4="}]},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.4.2":{"name":"genny","version":"0.4.2","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.4.2","dist":{"shasum":"907e6b441ce2dff77f4dc541416f50b91a16ffb2","tarball":"https://registry.npmjs.org/genny/-/genny-0.4.2.tgz","integrity":"sha512-FJOKinRwEldg7P0RZnxpZQQN+UXCv0NlxEwhUtQSO52kIAZZzj3kFr/WzJUISsTP4bI0tYbNuJGkZmkaCorYlg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEYhe0wSSgwJNLHRu9FsXhd3K+q2zZ7mwM1sPAoX5IUGAiEAoLCptL+rOh8CL1AIuMxcr2OCqapV/hZx7w90yERbxA0="}]},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.4.3":{"name":"genny","version":"0.4.3","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.4.3","dist":{"shasum":"7706a4c04995c2a327d2c6f9b00288266d2db0a9","tarball":"https://registry.npmjs.org/genny/-/genny-0.4.3.tgz","integrity":"sha512-D2qDcyuF7IhpTberxWBsUBzDJo0GIU94gI1GDh+Txf6TmQDvjVitubb6z2kb1/DERplxw492YXuBeWgQV8Kayg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkSA2rNnUgedhT2d4bilOHFecP6/S+LebDPLkP3etypAIhAOUbtpGMtMUV2iR8TxRw1LzmTmsKweIvtDW7KClMdHrk"}]},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.4.4":{"name":"genny","version":"0.4.4","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.4.4","dist":{"shasum":"0a47d8730d5c8212416cb0d70f64fc5d101b0edf","tarball":"https://registry.npmjs.org/genny/-/genny-0.4.4.tgz","integrity":"sha512-p7EzuGwt9Z/g1OJnO+rSXrChvYboY30imbuyMQYTx2Kca7+0zq1uedc+EDTYfH0LqcetcjI6RCO/9NOGaI5Y6g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsWcb1jVhioSt/guHVHzhOi0y8p05MDQ+t1B4LEkLVcAIgTl/9VslRgfI5cUt7zTd+KeUmliAkvZCp5h0A/8xNBAo="}]},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.5.0":{"name":"genny","version":"0.5.0","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3","q":"~0.9.6"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.5.0","dist":{"shasum":"46782dd5bf0e0e960aca38bc957f379d89b7e174","tarball":"https://registry.npmjs.org/genny/-/genny-0.5.0.tgz","integrity":"sha512-jTUCVjEV9S8bXnmFcCuhZ3Kvd3w/l25rhyRFLHhjfJ+W/sfUpQuWhpgDJYlCLR/b1I+0+qelKHRAbRWeIz5J3Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBFXfuLwg7R/v4xlIf0tWssBIcI/CaGvMUeD6DT9S69DAiEApEecBtohhWO6wjPeZFA9aMvNCots/XCzeVZhLHl7+nU="}]},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.5.1":{"name":"genny","version":"0.5.1","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3","q":"~0.9.6"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.5.1","dist":{"shasum":"6dacc2931b568e02a19ee0a4b8866289cc22cac5","tarball":"https://registry.npmjs.org/genny/-/genny-0.5.1.tgz","integrity":"sha512-xEG5UqvMxX52Q9OH+509ET4wXr05YbyVzl0HaCp5WmdalLSTXOqRthra4bf84F0mddoRJy3nBkLD7nzMjvMUNw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEAU/fOjV2ZMjRM5UmmG0BjCtKE3PUY9khWJzZLIXJ/NAiAwp6ZfkqZD2Z9fL17H8BdlVa+VVglVZlft/1PccS0rtA=="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.5.2":{"name":"genny","version":"0.5.2","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3","q":"~0.9.6"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.5.2","dist":{"shasum":"bbcc794f39d4fe058975750315cb106c71fb00c9","tarball":"https://registry.npmjs.org/genny/-/genny-0.5.2.tgz","integrity":"sha512-5ztm4NomCHeutv92cF09bgW5uR1WKAciwgvg5sA/fV7AwN/scegUILuAgxx6jL3ObbNhsrwFvBvaq00IXnuZhA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkQzJCHH6a2tYq+Ki/u1pJBJ2+9eiIUwhEcdHK7V+7IQIgJf0ETHYGobVC2dFCuq9uIkxYM7y3DEpwFpIh7RS7ZIE="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.5.3":{"name":"genny","version":"0.5.3","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3","q":"~0.9.6"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.5.3","dist":{"shasum":"04ca279bc46dcf5d1ffcf794e37c2298ece608b9","tarball":"https://registry.npmjs.org/genny/-/genny-0.5.3.tgz","integrity":"sha512-kayw8Lr7oWIFTKLdKWBlwsmqpoIK94Zawg4H2LIFR4vhip/u4QRMtXRiAZ7b+51liB3znKx6pFjtlgGerORo3w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFfJ/K8ozNyPmVOaXCrc4MAoKyPH+yfOtgmqirshb0sYAiB3XV1U2Pm2wPeM4SNggq6R+EThuRYWy3MZWaOozvuyhw=="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.5.4":{"name":"genny","version":"0.5.4","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["generator","callback","hell","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3","q":"~0.9.6"},"bugs":{"url":"https://github.com/spion/genny/issues"},"_id":"genny@0.5.4","dist":{"shasum":"481f153598e9f0405d02d72bc2224636d1dcca25","tarball":"https://registry.npmjs.org/genny/-/genny-0.5.4.tgz","integrity":"sha512-EjOColL1ylvnAVUa/R+VRjy5yJKSEQvPgbtKDge4WLvMkMpEzn66+7vj/95h13FuOb3bH9K9Vzi68WgJnmJEHA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAGFB1PgvReax8407W5vQVDQmj9ogLYbpyIrIJBjJRiZAiEA/G/5ENKBAGKG9r22WKpmYAtGUxU9bYZEbsh4G90J7rg="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.5.5":{"name":"genny","version":"0.5.5","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["async","generator","callback","yield","resume","suspend"],"engines":{"node":">=0.11.2"},"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3","q":"~0.9.6"},"bugs":{"url":"https://github.com/spion/genny/issues"},"homepage":"https://github.com/spion/genny","_id":"genny@0.5.5","dist":{"shasum":"cdef6aab533df15a6295b4f7f8e0e2d089fe2db3","tarball":"https://registry.npmjs.org/genny/-/genny-0.5.5.tgz","integrity":"sha512-1k3WgKaEG9ZT9stmrW15Wczdfe2zGkYpz1K2tYLkRkh3cuuAR5mcI19BbKcqMSg/3ItRfsVSmmCeRpkw+HoV4A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBSkrdeXiD+ivrRF5sFO5Kuobn7e/S3QqzBS0ZUF/QPlAiB7Dm0FR0j1aPcqJMJ1tImuc3gsbngcTFDSvqgpUeEDnQ=="}]},"_from":".","_npmVersion":"1.3.13","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]},"0.5.6":{"name":"genny","version":"0.5.6","description":"A tiny ES6 (harmony) library for node 0.11.2+ that helps you use generators with node style callbacks.","main":"index.js","directories":{"test":"test"},"scripts":{"test":"tap test/index.js"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"keywords":["async","generator","callback","yield","resume","suspend"],"author":{"name":"spion"},"license":"MIT","devDependencies":{"tap":"~0.4.3","q":"~0.9.6"},"bugs":{"url":"https://github.com/spion/genny/issues"},"gitHead":"5c8e1867243b860c2a321feebe3de8168c4f930a","homepage":"https://github.com/spion/genny#readme","_id":"genny@0.5.6","_shasum":"33295fed266e71774996accdcc105a99e235d369","_from":".","_npmVersion":"2.9.0","_nodeVersion":"2.0.1","_npmUser":{"name":"spion","email":"gorgi.kosev@gmail.com"},"dist":{"shasum":"33295fed266e71774996accdcc105a99e235d369","tarball":"https://registry.npmjs.org/genny/-/genny-0.5.6.tgz","integrity":"sha512-yoOi4nnjzKNyj/bcn9V1pNf6A6FchXlOEWIiHxOOavXzlutGPDRJvv1i/T8lGvI/ZKv81RSSDXLPrcQCA87fxw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfQdgWNOw+FqMgd3fTtkRbAJrMXUrzAOx8OiZTG12y6wIhAOKIrmQYoQ/GImowWiwqbwDsyGCUOBVLSdA5QhgWLetK"}]},"maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}]}},"readme":"# genny\n\nAn ES6 (harmony) library for node 0.11.2 and up that helps you use generators\nwith node style callbacks, similar to\n[suspend](https://github.com/jmar777/suspend)\n\nBenefits:\n\n- No need to wrap anything or use fn.bind. Works with regular callback-taking\n  node functions.\n- Complete error stack traces\n- Compatible: also works with promises, thunks and arrays of promises/thunks.\n\n\n# usage examples\n\nSpawn a generator task. From within your task, call your async functions with\nyield. Instead of a callback function, pass them a generated resume function:\n\n```js\ngenny.run(function* (resume) {\n    console.log(\"Hello\");\n    yield setTimeout(resume(), 1000);\n    console.log(\"World\");\n});\n```\n\nGenny automatically passes `resume` as the last argument to your generator.\nIts a constructor that can make resume callbacks.\n\nThe generator pauses when it encounters a yield, then resumes when the created\nresume callback is called by the async operation. If the callback was called\nwith a value:\n\n```js\nfn(null, value)\n```\n\nthen the yield expression will return that value.\n\nExample:\n\n```js\ngenny.run(function* (resume) {\n    var data = yield fs.readFile(\"test.js\", resume());\n    console.log(data.toString())\n});\n```\n\n## errors\n\nYou can handle errors with `try`/`catch`, or as return results via\n`resume.nothrow`\n\n```js\ngenny.run(function* (resume) {\n    // Throwing resume\n    try {\n        yield fs.readFile(\"test.js\", resume());\n    }\n    catch (e) { // handle error\n        console.error(\"Error reading file\", e);\n    }\n    // Non-throwing resume, result is an array.\n    var err_res = yield fs.readFile(\"test.js\", resume.nothrow());\n    if (err_res[0]) { // handle error\n        console.error(\"Error reading file\", err_res[0]);\n    }\n});\n```\n\nAlternatively, you can pass a callback argument to `genny.run`:\n\n```js\ngenny.run(function* (resume) {\n    var data = yield fs.readFile(\"test.js\", resume());\n}, function(err) {\n    // thrown error propagates here automatically\n    // because it was not caught.\n    if (err)\n        console.error(\"Error reading file\", err);\n});\n```\n\n## running things in parallel\n\nIf you need to run multiple operations in parallel, don't yield immediately:\n\n```js\ngenny.run(function* (resume) {\n    fs.readFile(\"test.js\", resume());\n    fs.readFile(\"test2.js\", resume());\n    var file1 = yield, file2 = yield;\n    return file1.toString() + file2.toString();\n});\n```\n\nThe order of yield results is guaranteed to be the same as the order of the\n`resume()` callback constructors. Feel free to use it in loops too:\n\n```js\ngenny.run(function* (resume) {\n    // read files in parallel\n    for (var k = 0; k < files.length; ++k)\n        fs.readFile(file[k], resume());\n\n    // wait for all of them to be read\n    var content = [];\n    for (var k = 0; k < files.length; ++k)\n        content.push(yield);\n\n});\n```\n\nYou may also give yield a thunk (a function that take callback) or a promise\n\n```js\ngenny.run(function* () {\n    var first = yield\n      function(callback) { fs.readFile(\"test1.js\", callback); };\n    var files = yield [\n      function(callback) { fs.readFile(\"test2.js\", callback); },\n      function(callback) { fs.readFile(\"test3.js\", callback); },\n    ];\n    return first + files[0].toString() + files[1].toString();\n});\n```\n\nor an array of these which will be run in parallel.\n\n## creating callback functions\n\nYou can also use `genny.fn` instead to create a function which\ncan accept multiple arguments and a callback. The arguments will be\npassed to your generator, but instead of the callback, you will get\ngenny's `resume`\n\n```js\nvar getLine = genny.fn(function* (file, number, resume) {\n    var data = yield fs.readFile(file, resume());\n    return data.toString().split('\\n')[number];\n});\n\ngetLine('test.js', 2, function(err, line) {\n    // thrown error propagates here automagically\n    // because it was not caught.\n    // If the file actually exists, lineContent\n    // will contain the second line\n    if (err)\n        console.error(\"Error reading line\", err);\n});\n```\n\nThe result is a function that takes the specified arguments plus\na standard node style callback. If you return a value at the end of your\ngenerator, it is passed as the result argument to the callback.\n\n## multi-argument callbacks, calling generators\n\nIf the async function calls the callback with more than 2 arguments, an\narray will be returned from the yield expression:\n\n```js\nfunction returnsmore(callback) {\n    callback(null, 'arg1', 'arg2');\n}\n\ngenny.run(function* (resume) {\n    var res = yield returnsmore(resume());\n    var arg1 = res[0];\n    var arg2 = res[1];\n    var nothrowres = yield returnsmore(resume.nothrow());\n    var err = res[0];\n    var arg1 = res[1];\n    var arg2 = res[2];\n});\n```\n\nUse `yield*` and `resume.gen()` to call a genny-compatible generator:\n\n```\nyield* someGenerator(args..., resume.gen())\n```\n\n# listeners and middleware\n\n`genny.fn` creates a callback-taking node function which requires its last\nargument to be a callback. To create a listener function use `genny.listener`\ninstead:\n\n```js\nee.on('event', genny.listener(function* (resume) { ... }));\n```\n\nListeners currently ignore all errors and return values, but this may change\nin the future.\n\nTo create an express or connect middleware that properly forwards errors,\nuse `genny.middleware`\n\n```js\napp.get('/test', genny.middleware(function* (req, res, resume) {\n    if (yield isAuth(req, resume.t))\n        return true; // will call next()\n    else\n        throw new HttpError(401, \"Unauthorized\"); // will call next(err)\n\n    // or use return; and next() will not be called.\n});\n```\n\n# debugging\n\ngenny comes with longStackSupport that enables you to trace\nerrors across generators. Simply write:\n\n```js\nrequire('genny').longStackSupport = true\n```\n\nto get stack traces like these:\n\n```\nError: oops\n    at Object._onImmediate (/home/spion/Documents/genny/test/index.js:10:12)\n    at processImmediate [as _immediateCallback] (timers.js:325:15)\nFrom generator:\n    at innerGenerator1 (/home/spion/Documents/genny/test/index.js:136:26)\n    at innerGenerator2 (/home/spion/Documents/genny/test/index.js:139:43)\n    at innerGenerator3 (/home/spion/Documents/genny/test/index.js:142:43)\n    at Test.completeStackTrace2 (/home/spion/Documents/genny/test/index.js:145:43)\n```\n\nfor code like this:\n\n```js\nfunction* innerGenerator1(resume) {\n    yield errors(resume());\n}\nfunction* innerGenerator2(resume) {\n    yield* innerGenerator1(resume.gen());\n}\nfunction* innerGenerator3(resume) {\n    yield* innerGenerator2(resume.gen());\n}\nyield* innerGenerator3(resume.gen());\n```\n\nThis results with CPU overhead of approximately 100% and memory overhead of\napproximately 80%.\n\nIn the future, the overhead will probably be eliminated in node but not in\nbrowsers.\n\n# more info\n\nLook in `test/index.js` for more examples and tests.\n\n# thanks\n\n[jmar777](https://github.com/jmar777) for his awesome\n[suspend](https://github.com/jmar777/suspend) library which served\nas the base for genny\n\n# license\n\nMIT\n\n","maintainers":[{"name":"spion","email":"gorgi.kosev@gmail.com"}],"time":{"modified":"2022-06-18T07:30:42.445Z","created":"2013-06-12T17:33:36.781Z","0.0.1":"2013-06-12T17:33:41.270Z","0.2.0":"2013-07-06T11:05:20.742Z","0.2.1":"2013-07-06T11:56:55.422Z","0.2.2":"2013-07-30T13:16:39.076Z","0.2.3":"2013-07-30T14:52:11.378Z","0.2.4":"2013-07-30T16:23:46.775Z","0.2.6":"2013-08-05T16:45:00.357Z","0.2.7":"2013-08-05T16:54:51.490Z","0.2.8":"2013-08-09T17:02:20.172Z","0.3.1":"2013-08-13T01:17:45.383Z","0.3.2":"2013-08-13T01:37:44.388Z","0.3.3":"2013-08-13T01:41:09.026Z","0.3.4":"2013-08-13T02:48:50.278Z","0.3.5":"2013-08-13T03:00:18.282Z","0.3.6":"2013-08-13T03:30:49.424Z","0.3.7":"2013-08-13T11:27:19.472Z","0.4.0":"2013-08-15T17:52:32.155Z","0.4.1":"2013-08-15T20:02:10.703Z","0.4.2":"2013-08-15T20:22:50.435Z","0.4.3":"2013-08-15T20:31:04.825Z","0.4.4":"2013-08-15T21:00:47.541Z","0.5.0":"2013-08-19T22:40:46.974Z","0.5.1":"2013-08-30T13:47:36.301Z","0.5.2":"2013-09-05T00:42:00.608Z","0.5.3":"2013-10-02T11:20:05.550Z","0.5.4":"2013-10-02T17:38:30.196Z","0.5.5":"2013-11-04T11:54:04.300Z","0.5.6":"2015-05-14T11:30:33.388Z"},"author":{"name":"spion"},"repository":{"type":"git","url":"git://github.com/spion/genny.git"},"homepage":"https://github.com/spion/genny#readme","keywords":["async","generator","callback","yield","resume","suspend"],"bugs":{"url":"https://github.com/spion/genny/issues"},"license":"MIT","readmeFilename":"README.md"}