{"_id":"galaxy","_rev":"836131","name":"galaxy","description":"Cosmic harmony with callbacks and generators","dist-tags":{"latest":"0.1.12"},"maintainers":[{"name":"bjouhier","email":"bjouhier@gmail.com"}],"time":{"modified":"2024-07-09T04:29:07.000Z","created":"2013-05-30T22:09:22.233Z","0.1.12":"2015-03-07T20:32:26.450Z","0.1.11":"2014-09-20T21:42:32.727Z","0.1.10":"2014-09-09T20:25:33.381Z","0.1.9":"2014-09-09T20:21:49.069Z","0.1.8":"2014-08-12T20:49:27.473Z","0.1.7":"2014-06-02T17:51:24.649Z","0.1.6":"2014-05-07T23:42:06.423Z","0.1.5":"2014-04-28T22:57:38.591Z","0.1.4":"2014-01-04T12:39:38.087Z","0.1.1-c":"2014-01-04T12:39:38.087Z","0.1.1-a":"2014-01-04T12:39:38.087Z","0.1.0-a":"2014-01-04T12:39:38.087Z","0.1.3":"2013-07-13T12:19:53.464Z","0.1.2":"2013-06-21T22:01:10.543Z","0.1.0":"2013-05-30T22:09:22.233Z"},"users":{"tunnckocore":true},"author":{"name":"Bruno Jouhier"},"repository":{"type":"git","url":"git://github.com/bjouhier/galaxy.git"},"versions":{"0.1.12":{"name":"galaxy","description":"Cosmic harmony with callbacks and generators","version":"0.1.12","repository":{"type":"git","url":"git://github.com/bjouhier/galaxy.git"},"engines":{"node":">=0.11.10"},"dependencies":{},"author":{"name":"Bruno Jouhier"},"directories":{"lib":"./lib"},"main":"index.js","gitHead":"9e2db7a9339d56b11821835462a80f1672c09825","bugs":{"url":"https://github.com/bjouhier/galaxy/issues"},"homepage":"https://github.com/bjouhier/galaxy","_id":"galaxy@0.1.12","scripts":{},"_shasum":"0c989774f2870c69378aa665648cdc60f343aa53","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"bjouhier","email":"bjouhier@gmail.com"},"maintainers":[{"name":"bjouhier","email":"bjouhier@gmail.com"}],"dist":{"shasum":"0c989774f2870c69378aa665648cdc60f343aa53","tarball":"http://registry-npm.ywwl.com/galaxy/download/galaxy-0.1.12.tgz","integrity":"sha512-UkjfRBdO/A8UNJySmvHcstf/lQlvOvv/MJHx2uIEgi/9haBt3xw47JgmfhNg9tbhzTCf6dnNJhEf0uKRRfoQPg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGgt2+HzopgE0UAS9tK6E4QuRRQOjO1TojmoMlVGRUC9AiA0Bo2YQR9wUaiyqqU6Sx7oTCIPgi7zsvyYHmPoWri8cw=="}],"size":53306,"noattachment":false,"key":"/galaxy/-/galaxy-0.1.12.tgz"},"publish_time":1425760346450,"_cnpm_publish_time":1425760346450},"0.1.11":{"name":"galaxy","description":"Cosmic harmony with callbacks and generators","version":"0.1.11","repository":{"type":"git","url":"git://github.com/bjouhier/galaxy.git"},"engines":{"node":">=0.11.10"},"dependencies":{},"author":{"name":"Bruno Jouhier"},"directories":{"lib":"./lib"},"main":"index.js","gitHead":"e575fac46a13a08ab3b969e49119901c294d27e6","bugs":{"url":"https://github.com/bjouhier/galaxy/issues"},"homepage":"https://github.com/bjouhier/galaxy","_id":"galaxy@0.1.11","scripts":{},"_shasum":"09d5edd04cdd5a0a43102e49b06afd32ac6527b3","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"bjouhier","email":"bjouhier@gmail.com"},"maintainers":[{"name":"bjouhier","email":"bjouhier@gmail.com"}],"dist":{"shasum":"09d5edd04cdd5a0a43102e49b06afd32ac6527b3","tarball":"http://registry-npm.ywwl.com/galaxy/download/galaxy-0.1.11.tgz","integrity":"sha512-qfUoVxp+Fz3u/qfpv4ksRClHuVoaA4E802m8olN+N/x05THs13kGUMv//RUa1EpsSmA5Nx8JZ6g8Se0vRxK1jw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIASonkP7WLbdToQxjgN30Wx6D/FCpB/I9jzyuS+AhQtaAiBbQDyc3j7oJJrc7A6yoBDkmQM/KS+NBjV8/+g395GM9g=="}],"size":53746,"noattachment":false,"key":"/galaxy/-/galaxy-0.1.11.tgz"},"publish_time":1411249352727,"_cnpm_publish_time":1411249352727},"0.1.10":{"name":"galaxy","description":"Cosmic harmony with callbacks and generators","version":"0.1.10","repository":{"type":"git","url":"git://github.com/bjouhier/galaxy.git"},"engines":{"node":">=0.11.10"},"dependencies":{},"author":{"name":"Bruno Jouhier"},"directories":{"lib":"./lib"},"main":"index.js","gitHead":"83361629f6f2e76b93af68a121101c3f9c948f79","bugs":{"url":"https://github.com/bjouhier/galaxy/issues"},"homepage":"https://github.com/bjouhier/galaxy","_id":"galaxy@0.1.10","scripts":{},"_shasum":"6408de4a05ddc6986f511427b0cc45a1e9218d4c","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"bjouhier","email":"bjouhier@gmail.com"},"maintainers":[{"name":"bjouhier","email":"bjouhier@gmail.com"}],"dist":{"shasum":"6408de4a05ddc6986f511427b0cc45a1e9218d4c","tarball":"http://registry-npm.ywwl.com/galaxy/download/galaxy-0.1.10.tgz","integrity":"sha512-wiDdIbHMxhZHkr595nTpwLv6//fdsBjOLIKLlrUt0N8j59fZh7eR08++Kn59zW0TXLFL5JBT1EeBvwl/7MOWPQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9GQJqopc6ZZ9MGhiN2PQXWjfs6XtmC9VtbCiWSkxciAIhANrPB3LT+s9X4JdF+aARNpXW4JzmI8z762Z/XVie6Y4M"}],"size":53513,"noattachment":false,"key":"/galaxy/-/galaxy-0.1.10.tgz"},"publish_time":1410294333381,"_cnpm_publish_time":1410294333381},"0.1.9":{"name":"galaxy","description":"Cosmic harmony with callbacks and generators","version":"0.1.9","repository":{"type":"git","url":"git://github.com/bjouhier/galaxy.git"},"engines":{"node":">=0.11.10"},"dependencies":{},"author":{"name":"Bruno Jouhier"},"directories":{"lib":"./lib"},"main":"index.js","gitHead":"83361629f6f2e76b93af68a121101c3f9c948f79","bugs":{"url":"https://github.com/bjouhier/galaxy/issues"},"homepage":"https://github.com/bjouhier/galaxy","_id":"galaxy@0.1.9","scripts":{},"_shasum":"a7852d9d20c7a9c2eef5f5e215e0a8af833b839b","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"bjouhier","email":"bjouhier@gmail.com"},"maintainers":[{"name":"bjouhier","email":"bjouhier@gmail.com"}],"dist":{"shasum":"a7852d9d20c7a9c2eef5f5e215e0a8af833b839b","tarball":"http://registry-npm.ywwl.com/galaxy/download/galaxy-0.1.9.tgz","integrity":"sha512-aLtr6VHgu3286SUEelY5iRs64EUAEGMkCA1PakuqAhUYulUDjo+TrcRb3G3UZvZokSMMGVDuUnrZGf+ozHL4zg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAJKiUvVydgldw88KqaNw+4W0Gs0vKSipi2OIwFbK8DdAiBlMsnnnaSWSBNzqhGcC2TEhE5YfQlOXXveu4TS+fbwng=="}],"size":53487,"noattachment":false,"key":"/galaxy/-/galaxy-0.1.9.tgz"},"publish_time":1410294109069,"_cnpm_publish_time":1410294109069},"0.1.8":{"name":"galaxy","description":"Cosmic harmony with callbacks and generators","version":"0.1.8","repository":{"type":"git","url":"git://github.com/bjouhier/galaxy.git"},"engines":{"node":">=0.11.10"},"dependencies":{},"author":{"name":"Bruno Jouhier"},"directories":{"lib":"./lib"},"main":"index.js","gitHead":"41e8d33f82cae7aeaa9a727a872b2d7ccdc6a04b","bugs":{"url":"https://github.com/bjouhier/galaxy/issues"},"homepage":"https://github.com/bjouhier/galaxy","_id":"galaxy@0.1.8","scripts":{},"_shasum":"2ddca0b78a7ccb45ae928da02a047d37f6899e55","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"bjouhier","email":"bjouhier@gmail.com"},"maintainers":[{"name":"bjouhier","email":"bjouhier@gmail.com"}],"dist":{"shasum":"2ddca0b78a7ccb45ae928da02a047d37f6899e55","tarball":"http://registry-npm.ywwl.com/galaxy/download/galaxy-0.1.8.tgz","integrity":"sha512-3aNdxCH2RlBu77xoM6N5nxa5sfFF2Aa0FriTFfqbCoGo0yJbbapIJAgY+iwPSutQ58+qcycjPDsM4rJ9pDOgWQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZp55Ni1mJyrS2ZG3ifDeW9TBXxUITnI6S2yBe0gMG+AIhAPfnRrAOVWLyyw6s3H/JOVOn2chjy+KZ6m2GT8MHyuan"}],"size":53144,"noattachment":false,"key":"/galaxy/-/galaxy-0.1.8.tgz"},"publish_time":1407876567473,"_cnpm_publish_time":1407876567473},"0.1.7":{"name":"galaxy","description":"Cosmic harmony with callbacks and generators","version":"0.1.7","repository":{"type":"git","url":"git://github.com/bjouhier/galaxy.git"},"engines":{"node":">=0.11.10"},"dependencies":{},"author":{"name":"Bruno Jouhier"},"directories":{"lib":"./lib"},"main":"index.js","bugs":{"url":"https://github.com/bjouhier/galaxy/issues"},"homepage":"https://github.com/bjouhier/galaxy","_id":"galaxy@0.1.7","_shasum":"65b425453f9d01aee5ad3bf38e45e751aae68021","_from":".","_npmVersion":"1.4.8","_npmUser":{"name":"bjouhier","email":"bjouhier@gmail.com"},"maintainers":[{"name":"bjouhier","email":"bjouhier@gmail.com"}],"dist":{"shasum":"65b425453f9d01aee5ad3bf38e45e751aae68021","tarball":"http://registry-npm.ywwl.com/galaxy/download/galaxy-0.1.7.tgz","integrity":"sha512-lyBSQTBs48lLTE/aVkKQeAIgo9KzZc+D7iPklHXvBPyLNdTyxhE/rlvzYcz2t85INh/93ZSNB9HoUVThp5w7ng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEru2TcOE8hqpnVOeqcHvWl7CxvyZvhsSXuxMpZd9gX9AiAHAFyU7JR5kaaATI/5ZAmU10SbitXzKZOD0h0Gid0wIQ=="}],"size":52718,"noattachment":false,"key":"/galaxy/-/galaxy-0.1.7.tgz"},"publish_time":1401731484649,"_cnpm_publish_time":1401731484649},"0.1.6":{"name":"galaxy","description":"Cosmic harmony with callbacks and generators","version":"0.1.6","repository":{"type":"git","url":"git://github.com/bjouhier/galaxy.git"},"engines":{"node":">=0.11.10"},"dependencies":{},"author":{"name":"Bruno Jouhier"},"directories":{"lib":"./lib"},"main":"index.js","bugs":{"url":"https://github.com/bjouhier/galaxy/issues"},"homepage":"https://github.com/bjouhier/galaxy","_id":"galaxy@0.1.6","_shasum":"bb36ff5d866f0545406cb20588b499251b2b3651","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"bjouhier","email":"bjouhier@gmail.com"},"maintainers":[{"name":"bjouhier","email":"bjouhier@gmail.com"}],"dist":{"shasum":"bb36ff5d866f0545406cb20588b499251b2b3651","tarball":"http://registry-npm.ywwl.com/galaxy/download/galaxy-0.1.6.tgz","integrity":"sha512-bt3Ip4+eRg+1vo5qZiPAmupDksVZJ+3hGq2zUm5mbyoIR92Njj5/CqVDtCBdrXFMMRIvYYTobMpVMoWuR0MnrQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaPi5nwX27G/hJBzcWpq1gzO4ZN6hUwp2JHpeVvmLtSQIhAPDWnhJDmUfm7K18vqUjaRLZtKdX32bW8qnQs8RXSBVW"}],"size":52605,"noattachment":false,"key":"/galaxy/-/galaxy-0.1.6.tgz"},"publish_time":1399506126423,"_cnpm_publish_time":1399506126423},"0.1.5":{"name":"galaxy","description":"Cosmic harmony with callbacks and generators","version":"0.1.5","repository":{"type":"git","url":"git://github.com/bjouhier/galaxy.git"},"engines":{"node":">=0.11.10"},"dependencies":{},"author":{"name":"Bruno Jouhier"},"directories":{"lib":"./lib"},"main":"index.js","bugs":{"url":"https://github.com/bjouhier/galaxy/issues"},"homepage":"https://github.com/bjouhier/galaxy","_id":"galaxy@0.1.5","dist":{"shasum":"0e76b1341480ab4b79d8ec4818bdc960c8b7e306","tarball":"http://registry-npm.ywwl.com/galaxy/download/galaxy-0.1.5.tgz","integrity":"sha512-zKmvqsT9Li+/Ad1iRERqccLSURlUr050EuQ5na48fFIcwuiKM9dVAXtll3iJu93lGjPIrtEhC+8mdTwNrnHHvg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlkFkSuWoGxFs83wcCz3Sq7z9Cc1ALgdiLMoz4VmXHHQIgFiXLoLFc5qiOsGB6PCj7Mrt3j3j05Yt3HmzsdhzBfrc="}],"size":52660,"noattachment":false,"key":"/galaxy/-/galaxy-0.1.5.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"bjouhier","email":"bjouhier@gmail.com"},"maintainers":[{"name":"bjouhier","email":"bjouhier@gmail.com"}],"publish_time":1398725858591,"_cnpm_publish_time":1398725858591},"0.1.4":{"name":"galaxy","description":"Cosmic harmony with callbacks and generators","version":"0.1.4","repository":{"type":"git","url":"git://github.com/bjouhier/galaxy.git"},"engines":{"node":">=0.11.10"},"dependencies":{},"author":{"name":"Bruno Jouhier"},"directories":{"lib":"./lib"},"main":"index.js","bugs":{"url":"https://github.com/bjouhier/galaxy/issues"},"homepage":"https://github.com/bjouhier/galaxy","_id":"galaxy@0.1.4","dist":{"shasum":"beb02660296c34f02893392b90d55050d8d44298","tarball":"http://registry-npm.ywwl.com/galaxy/download/galaxy-0.1.4.tgz","integrity":"sha512-uReFIBALj+jeSJRJYP5yVFe31zIHTTQvXEzkDr6Ov+qfOIeCi2ySViRTf/p7KYk+P7Mq0UauAd/Q+5o2RKLF5Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEtdRcCAK0BM48v6jfSK0W/wB0B0K5ENLEt7FX/GmBUjAiEA+gZE/vZX67i8oZX2z53KaGP3HQYIr0CqzO2UeocMaAU="}],"size":52599,"noattachment":false,"key":"/galaxy/-/galaxy-0.1.4.tgz"},"_from":".","_npmVersion":"1.3.22","_npmUser":{"name":"bjouhier","email":"bjouhier@gmail.com"},"maintainers":[{"name":"bjouhier","email":"bjouhier@gmail.com"}],"publish_time":1388839178087,"_cnpm_publish_time":1388839178087},"0.1.1-c":{"name":"galaxy","description":"Cosmic harmony with callbacks and generators","version":"0.1.1-c","repository":{"type":"git","url":"git://github.com/bjouhier/galaxy.git"},"engines":{"node":">=0.11.2"},"dependencies":{},"author":{"name":"Bruno Jouhier"},"directories":{"lib":"./lib"},"main":"index.js","bugs":{"url":"https://github.com/bjouhier/galaxy/issues"},"_id":"galaxy@0.1.1-c","dist":{"shasum":"2a2cac84a83b0ffc0b299e538607490c789a30a6","tarball":"http://registry-npm.ywwl.com/galaxy/download/galaxy-0.1.1-c.tgz","integrity":"sha512-p3UUIXf02rLwqyqx7EgQMg/jOWubyKmTNV2H8Ka2NkcTH8di4OMfKXxtORershX9OBjDysvId2I+HZOoEuCgbg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8Uk49UiyEjnrC2SpKJlVqxRO/EqhNnGsFS6Ke9umRIgIhAIKXLK2JJKzvufmr29n4UWVLkneF72Y6T6yvW/wbaxit"}],"size":8254,"noattachment":false,"key":"/galaxy/-/galaxy-0.1.1c.tgz"},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"bjouhier","email":"bjouhier@gmail.com"},"maintainers":[{"name":"bjouhier","email":"bjouhier@gmail.com"}],"publish_time":1388839178087,"_cnpm_publish_time":1388839178087},"0.1.1-a":{"name":"galaxy","description":"Cosmic harmony with callbacks and generators","version":"0.1.1-a","repository":{"type":"git","url":"git://github.com/bjouhier/galaxy.git"},"engines":{"node":">=0.11.2"},"dependencies":{},"author":{"name":"Bruno Jouhier"},"directories":{"lib":"./lib"},"main":"index.js","bugs":{"url":"https://github.com/bjouhier/galaxy/issues"},"_id":"galaxy@0.1.1-a","dist":{"shasum":"5835edc38e39c7e7187e42fc7c5cd9cc617aab7b","tarball":"http://registry-npm.ywwl.com/galaxy/download/galaxy-0.1.1-a.tgz","integrity":"sha512-AjPU4OANq69jG4XJvpcf+//befsh6Js5b0uhanS7ET0FAmwesZ5OztYgwyXR82owa3s+RcuoEfkmoBEOAAZxXg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDEFYht8CRrTT57WuZzeRdz3PqXAH9yXs9S0zAssqBNAIgSKdw/7Mu9fytQdW1rqdHolqoLMNtwryzfZdyqc/qVrc="}],"size":5206,"noattachment":false,"key":"/galaxy/-/galaxy-0.1.1a.tgz"},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"bjouhier","email":"bjouhier@gmail.com"},"maintainers":[{"name":"bjouhier","email":"bjouhier@gmail.com"}],"publish_time":1388839178087,"_cnpm_publish_time":1388839178087},"0.1.0-a":{"name":"galaxy","description":"Celestial harmony between callbacks and generators","version":"0.1.0-a","repository":{"type":"git","url":"git://github.com/bjouhier/galaxy.git"},"engines":{"node":">=0.11.2"},"dependencies":{},"author":{"name":"Bruno Jouhier"},"directories":{"lib":"./lib"},"main":"index.js","bugs":{"url":"https://github.com/bjouhier/galaxy/issues"},"_id":"galaxy@0.1.0-a","dist":{"shasum":"046150826c9ef61c0d84cfec14e5d883c2c318e2","tarball":"http://registry-npm.ywwl.com/galaxy/download/galaxy-0.1.0-a.tgz","integrity":"sha512-TQK1RFyuxuHeBZFBixUTyqNlH+FcOp6Q0N8z0Jv8fCfYN1RGsFtWeD7+yYC2n337Xhu8E3siAtjtugU2/isojQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBAKznrVBBAVdzgd2Os2Q+p3K+DIlEJCzhlaVegREgmpAiAYKKrJ3Ke7C6SUgANQFus5XWY/gut2ojYWZ8g5z4kh8g=="}],"size":3063,"noattachment":false,"key":"/galaxy/-/galaxy-0.1.0a.tgz"},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"bjouhier","email":"bjouhier@gmail.com"},"maintainers":[{"name":"bjouhier","email":"bjouhier@gmail.com"}],"publish_time":1388839178087,"_cnpm_publish_time":1388839178087},"0.1.3":{"name":"galaxy","description":"Cosmic harmony with callbacks and generators","version":"0.1.3","repository":{"type":"git","url":"git://github.com/bjouhier/galaxy.git"},"engines":{"node":">=0.11.2"},"dependencies":{},"author":{"name":"Bruno Jouhier"},"directories":{"lib":"./lib"},"main":"index.js","bugs":{"url":"https://github.com/bjouhier/galaxy/issues"},"_id":"galaxy@0.1.3","dist":{"shasum":"88488973eec88b558215308403db754872975247","tarball":"http://registry-npm.ywwl.com/galaxy/download/galaxy-0.1.3.tgz","integrity":"sha512-XNrmw9bdVmZ+gkPT3eXNkqxsiHLxX7l6Pi7YGuiYzgRQiRRs8o9bsb5Q2+QzsuY1Up93D/l1GQALILJCfkYzlA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEFPEtLiJw/Txq8p/fQR08ftCKNUNidYanZ2L0v2vzVAIgN+d6xTbHbLc60yrX66M/RKx6akIpXckiHSVWw7i60AU="}],"size":61676,"noattachment":false,"key":"/galaxy/-/galaxy-0.1.3.tgz"},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"bjouhier","email":"bjouhier@gmail.com"},"maintainers":[{"name":"bjouhier","email":"bjouhier@gmail.com"}],"publish_time":1373717993464,"_cnpm_publish_time":1373717993464},"0.1.2":{"name":"galaxy","description":"Cosmic harmony with callbacks and generators","version":"0.1.2","repository":{"type":"git","url":"git://github.com/bjouhier/galaxy.git"},"engines":{"node":">=0.11.2"},"dependencies":{},"author":{"name":"Bruno Jouhier"},"directories":{"lib":"./lib"},"main":"index.js","bugs":{"url":"https://github.com/bjouhier/galaxy/issues"},"_id":"galaxy@0.1.2","dist":{"shasum":"b3702991e9ab2f75f7f7aee5c11fdd70e8187fef","tarball":"http://registry-npm.ywwl.com/galaxy/download/galaxy-0.1.2.tgz","integrity":"sha512-+vg8rDxxgGKBlZfb942Qk3/Jzs5a+p/7fSYcqJgorwpQLLh1IwbMIZO3aQBLq78thxmyN5IrFT6iTmAq3VxleA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8Go4h/Su40tLqfa39k0T6utVC8brzJ8OqG4G+ddbuDwIgX4vtTKtmvkjV8XNq0mKnk6oLXeUcH1lrpErLB1QdO0w="}],"size":60300,"noattachment":false,"key":"/galaxy/-/galaxy-0.1.2.tgz"},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"bjouhier","email":"bjouhier@gmail.com"},"maintainers":[{"name":"bjouhier","email":"bjouhier@gmail.com"}],"publish_time":1371852070543,"_cnpm_publish_time":1371852070543},"0.1.0":{"name":"galaxy","description":"Cosmic harmony with callbacks and generators","version":"0.1.0","repository":{"type":"git","url":"git://github.com/bjouhier/galaxy.git"},"engines":{"node":">=0.11.2"},"dependencies":{},"author":{"name":"Bruno Jouhier"},"directories":{"lib":"./lib"},"main":"index.js","bugs":{"url":"https://github.com/bjouhier/galaxy/issues"},"_id":"galaxy@0.1.0","dist":{"shasum":"5fd1d7680abb13d4d35bf519918dc0a1f1d4ad03","tarball":"http://registry-npm.ywwl.com/galaxy/download/galaxy-0.1.0.tgz","integrity":"sha512-cXZoht1xW8EDerI+XeL3yDYL3/j2VEcT/X/KhFFfuUkMw/wC89G4Xqdh33OlEWjFwSJ1C02Fl5RKJe951m0grQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEH/zzKTr91BexjRBz1WRnvRfnhMOn1jNoG7Bb1kwDzAAiAuPMd5RTVt+HoauYIz9hiie8HUaZa5IZTatm2tIEFx9Q=="}],"size":4864,"noattachment":false,"key":"/galaxy/-/galaxy-0.1.0.tgz"},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"bjouhier","email":"bjouhier@gmail.com"},"maintainers":[{"name":"bjouhier","email":"bjouhier@gmail.com"}],"publish_time":1369951762233,"_cnpm_publish_time":1369951762233}},"readme":"Galaxy brings `async/await` semantics to JavaScript with a minimal API, thanks to EcmaScript 6 generators.\n\n## async/await in JavaScript\n\nGalaxy lets you write async code as if JavaScript had [`async/await` keywords](http://msdn.microsoft.com/en-us/library/vstudio/hh191443.aspx).\n\nFor example, here is how you would write an async function that counts lines in a file:\n\n``` javascript\nfunction* countLines(path) {\n\tvar names = yield fs.readdir(path);\n\tvar total = 0;\n\tfor (var i = 0; i < names.length; i++) {\n\t\tvar fullname = path + '/' + names[i];\n\t\tif ((yield fs.stat(fullname)).isDirectory()) {\n\t\t\ttotal += yield countLines(fullname);\n\t\t} else {\n\t\t\tvar count = (yield fs.readFile(fullname, 'utf8')).split('\\n').length;\n\t\t\tconsole.log(fullname + ': ' + count);\n\t\t\ttotal += count;\n\t\t}\n\t}\n\treturn total;\n}\n```\n\nJust think of the `*` in `function*` as an `async` keyword and of `yield` as an `await` keyword.\n\nYou can write another async function that calls `countLines`:\n\n``` javascript\nfunction* projectLineCounts() {\n\tvar total = 0;\n\ttotal += yield countLines(__dirname + '/../examples');\n\ttotal += yield countLines(__dirname + '/../lib');\n\ttotal += yield countLines(__dirname + '/../test');\n\tconsole.log('TOTAL: ' + total);\n\treturn total;\n}\n```\n\nNote: don't forget to prefix all the async calls with a `yield`. Otherwise you will be adding _generator_ objects to `total` and you'll just get a `NaN`.\n\nCool! But where does galaxy come into play? This is just plain JavaScript (with ES6 generators) and there are no calls to any `galaxy` API. Pretty mysterious!\n\nThat's the whole point behind galaxy: you hardly see it. It lets you write async functions that call other async functions with `function*` and `yield`. There are no extra API calls. Exactly like you would write your code if the language had `async/await` keywords.\n\n## star/unstar\n\nThe magic happens in two places: when you call node.js async functions, and when node.js calls your async functions.\n\nThe node.js functions that we called in the example functions are `fs.readdir` and `fs.readFile`. Part of the magic is that `fs` is not your usual `require('fs')`. It is initialized as:\n\n``` javascript\nvar galaxy = require('galaxy');\nvar fs = galaxy.star(require('fs'));\n```\n\nThe `galaxy.star` call returns a module in which all the asynchronous functions have been _starred_, i.e. promoted from `function` to `function*`. When you call these functions with `yield` you get `await` semantics.\n\nNote that `galaxy.star` can also be applied to individual functions. So, instead of _starring_ the entire `fs` module, we could have starred individual functions:\n\n``` javascript\nvar galaxy = require('galaxy');\nvar fs = require('fs');\nvar readdir = galaxy.star(fs.readdir);\nvar readFile = galaxy.star(fs.readFile);\n```\n\n---\n\nThe other side of the magic happens when node.js calls your `function*` APIs. In our example, this happens when we call `projectLineCounts`, our main function. Here is the code:\n\n``` javascript\nvar projectLineCountsCb = galaxy.unstar(projectLineCounts);\n\nprojectLineCountsCb(function(err, result) {\n\tif (err) throw err;\n\tconsole.log('CALLBACK RESULT: ' + result);\n});\n```\n\nThe `galaxy.unstar` call converts our `function*` into a regular node.js `function` that we then call with a callback.\n\n`galaxy.unstar` can also be applied to a whole module, in which case it _unstars_ all the functions of the module. This is handy if you have written a library with galaxy and you want to make it available to developers who write their code in callback style. Just create another module that exports the _unstarred_ version of your functions:\n\n``` javascript\nvar galaxy = require('galaxy');\nmodule.exports = galaxy.unstar(require('my-starred-functions'));\n```\n\nTogether, `galaxy.star` and `galaxy.unstar` take care of all the ugly work to make `*/yield` behave like `async/await`.\n\n## Parallelizing\n\nFine. But all the code that we have seen above is completely sequential. Would be nice if we could parallelize some calls.\n\nThis is actually not very difficult: instead of _yielding_ on a generator returned by a _starred_ function you can _spin_ on it. This runs the generator in parallel with your other code and it gives you back a future. The future that you obtain is just another _starred_ function on which you can _yield_ later to get the result of the computation.\n\nSo, for example, you can parallelize the `projectLineCounts` operation by rewriting it as:\n\n``` javascript\nfunction* projectLineCountsParallel() {\n \tvar future1 = galaxy.spin(countLines(__dirname + '/../examples'));\n \tvar future2 = galaxy.spin(countLines(__dirname + '/../lib'));\n\tvar future3 = galaxy.spin(countLines(__dirname + '/../test'));\n \tvar total = (yield future1()) + (yield future2()) + (yield future3());\n\tconsole.log('TOTAL: ' + total);\n\treturn total; \n}\n```\n\nNote: this is not true parallelism; the futures only move forwards when execution reaches `yield` keywords in your code.\n\nGalaxy also provides a `funnel` call that you can use to limit the level of parallelism on a given block of code. By setting the funnel's size to 1 you can set up critical sections. See the [galaxy API](https://github.com/bjouhier/galaxy/blob/master/lib/galaxy.md) for details.\n\n## Array utilities\n\nGalaxy provides async variants of the EcmaScript 5 array functions (`forEach`, `map`, `filter`, ...). These variants give you the choice between sequential and parallel execution when relevant.\n\nSee [API documentation](https://github.com/bjouhier/galaxy/blob/master/lib/array.md) for details.\n\n## Exception Handling\n\nThe usual exception handling keywords (`try/catch/finally/throw`) work as you would expect them to.\n\nIf an exception is thrown during the excution of a future, it is thrown when you _yield_ on the future, not when you create it with `galaxy.spin`.\n\n## Long stacktrace\n\nGalaxy provides long stacktraces. Here is a typical stacktrace:\n\n```\nError: getaddrinfo ENOTFOUND\n    <<< yield stack >>>\n    at googleSearch (/Users/bruno/dev/syracuse/node_modules/galaxy/tutorial/tuto6-mongo.js:43:11)\n    at search (/Users/bruno/dev/syracuse/node_modules/galaxy/tutorial/tuto6-mongo.js:30:34)\n    at  (/Users/bruno/dev/syracuse/node_modules/galaxy/tutorial/tuto6-mongo.js:22:29)\n    <<< raw stack >>>\n    at errnoException (dns.js:37:11)\n    at Object.onanswer [as oncomplete] (dns.js:124:16)\n```\n\nThe `<<< yield stack >>>` part is a stack which has been reconstructed by the galaxy library and which reflects the stack of `yield` calls in your code. \n\nThe `<<< raw stack >>>` part gives you the low level callback stack that triggered the exception. It is usually a lot less helpful than the _yield_ stack because it does not give you much context about the error.\n\nThis feature requires that you install the [galaxy-stack](https://github.com/bjouhier/galaxy-stack) addon module:\n\n```\nnpm install galaxy-stack\n```\n\n## Stable context\n\nGlobal variables are evil. Everyone knows that!\n\nBut there are a few cases where they can be helpful. \nThe main one is to track information about _who_ is executing the current request: security context, locale, etc. This kind of information is usually very stable (for a given request) and it would be very heavy to pass it explicitly down to all the low level APIs that need it. So the best way is to pass it implicitly through some kind of global context.\n\nBut you need a special global which is preserved across _yield_ points. If you set it at the beginning of a request it should remain the same throughout the request (unless you change it explicitly). It should not change under your feet because other requests with different contexts get interleaved.\n\nGalaxy exposes a `context` property that is guaranteed to be stable across yield points. If you assign an object to `galaxy.context` at the beginning of a request, you can retrieve it later.\n\nNote: this functionality is more or less equivalent to Thread Local Storage (TLS) in threaded systems.\n\n## Odd callbacks\n\nGalaxy is designed to work with functions that have the usual node.js callback signature: `callback(err, result)`. It also works with functions that return several results through their callback. In this case the results are returned as an array. For example:\n\n``` javascript\nvar request = require('request');\n// request.get calls its callback as callback(err, response, body)\n\nvar get = galaxy.star(request.get);\nvar r = yield get(url);\n// the starred version returns [response, body]\nconsole.log(\"status=\" + r[0].statusCode);\nconsole.log(\"body=\" + r[1]);\n```\n\nOn the other hand, galaxy cannot deal directly with functions that have an odd callback signature. The best example is `fs.exists` which does not have any error parameter in its callback. You need a special wrapper to deal with such calls:\n\n```\n// the wrapper\nfunction existsWrapper(path, cb) {\n\tfs.exists(path, function(result) { cb(null, result); })\n}\n\nvar exists = galaxy.star(existsWrapper);\nvar found = yield exists(__dirname + '/README.md');\n```\n\n## Interrupting a future\n\nFutures can be made interruptible by passing an `interrupt` option to the `galaxy.spin` call:\n\n```javascript\nvar fut = galaxy.spin(asyncFn(), {\n\tinterrupt: function() {\n\t\tif (interruptRequested) return true;\n\t});\n\n// somewhere else\n// this yield will never return if fut is interrupted (see note below)\nvar result = yield fut();\n\n```\n\nNote: this feature is very experimental. It could be enhanced to throw an exception into the code which is yielding on the future but it is not clear whether this should bypass or not the catch/finally clauses that may be active on the future's stack.\n\n## Streams\n\nGalaxy works with [ez-streams](https://github.com/Sage/ez-streams), a simple streaming API for node.js.\n\n## Asynchronous constructor\n\nGalaxy also lets you invoke constructors that contain asynchronous calls but this is one of the rare cases where you cannot just use the usual JavaScript keyword. Instead of the `new` keyword you use the special `galaxy.new` helper. Here is an example:\n\n``` javascript\n// asynchronous constructor\nfunction* MyClass(name) {\n\tthis.name = name;\n\tyield myAsyncFn();\n}\n\n// create an instance of MyClass\nvar myObj = (yield galaxy.new(MyClass)(\"obj1\"));\nconsole.log(myObj.name);\n```\n\n## API\n\nSee [API.md](API.md)\n\nSee also the [tutorial](tutorial/tutorial.md) and the [examples](examples).\n\n## Installation\n\n``` sh\n$ npm install galaxy\n$ npm install galaxy-stack\n```\n\n`galaxy-stack` is an optional module that you should install to get long stacktraces.\n\nThen you can try the examples:\n\n``` sh\n$ cd node_modules/galaxy\n$ node --harmony examples/countLines\n... some output ...\n$ node --harmony examples/countLinesParallel\n... slightly different output  ...\n```\n\n## Running in the browser\n\nGalaxy also runs browser side but you need a recent browser like Firefox 31 or Google Chrome 39 that you can download from https://www.google.com/chrome.\n\nYou're all set and you can open the examples/hello-browser.html page to see Galaxy in action. Pretty boring demo but at least it works!\n\n## Gotchas\n\nGenerators have been added very recently to V8. To use them you need to:\n\n* Install node.js version 0.11.2 (unstable) or higher.\n* Run node with the `--harmony` flag.\n\nFor example, to run the example above:\n\n``` sh\n$ node -v\nv0.11.2\n$ node --harmony examples/countLines\n```\n\nThe yield keyword can be tricky because it has a very low precedence. For example you cannot write:\n\n``` javascript\nvar sum1 = yield a() + yield b();\nvar sum2 = yield c() + 3;\n```\n\nbecause they get interpreted as:\n\n``` javascript\nvar sum1 = yield (a() + yield b()); // compile error\nvar sum2 = yield (c() + 3); // galaxy gives runtime error\n```\n\nYou have to write:\n\n``` javascript\nvar sum = (yield a()) + (yield b());\nvar sum2 = (yield c()) + 3;\n```\n\nThis brings a little lispish flavor to your JS code.\n\n\n## More info\n\nThis design is strongly inspired from bits and pieces of [streamline.js](https://github.com/Sage/streamlinejs). The following blog articles (some a bit old) give background information on this design:\n\n* [bringing async/await to life in JavaScript](http://bjouhier.wordpress.com/2013/06/01/bringing-asyncawait-to-life-in-javascript/)\n* [an early experiment with generators](http://bjouhier.wordpress.com/2012/05/18/asynchronous-javascript-with-generators-an-experiment/).\n* [futures = currying the callback](http://bjouhier.wordpress.com/2011/04/04/currying-the-callback-or-the-essence-of-futures/)\n* [stream API: events or callbacks](http://bjouhier.wordpress.com/2012/07/04/node-js-stream-api-events-or-callbacks/)\n\nThe streamline.js tool has been adapted to generate `galaxy` code in `--generators` mode. So, you can also use streamline.js as a preprocessor to generate `galaxy` code.\n\n## License\n\nThis work is licensed under the [MIT license](http://en.wikipedia.org/wiki/MIT_License).\n\n","_attachments":{},"homepage":"https://github.com/bjouhier/galaxy","bugs":{"url":"https://github.com/bjouhier/galaxy/issues"}}