{"versions":{"0.8.0":{"name":"event-to-promise","version":"0.8.0","license":"MIT","description":"Create a promise waiting for an event","keywords":["event","promise"],"homepage":"https://github.com/JsCommunity/event-to-promise","bugs":{"url":"https://github.com/JsCommunity/event-to-promise/issues"},"author":{"name":"Julien Fontanet","email":"julien.fontanet@isonoe.net","url":"http://julien.isonoe.net"},"repository":{"type":"git","url":"git+https://github.com/JsCommunity/event-to-promise.git"},"devDependencies":{"browserify":"^14.1.0","husky":"^0.13.1","jest":"^19.0.2","native-promise-only":"^0.8.1","standard":"^9.0.0","uglify-js":"^2.8.3"},"scripts":{"commitmsg":"yarn test","dev-test":"jest --watch","lint":"standard","prepublish":"mkdir -p dist && browserify -s eventToPromise index.js | uglifyjs -c > dist/event-to-promise.js","posttest":"npm run lint","test":"jest"},"files":["dist/","index.js"],"gitHead":"448047389af5c9e5121c7528c1c9af0e1689b399","_id":"event-to-promise@0.8.0","_shasum":"4b84f11772b6f25f7752fc74d971531ac6f5b626","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.6.0","_npmUser":{"name":"anonymous","email":"julien.fontanet@isonoe.net"},"dist":{"shasum":"4b84f11772b6f25f7752fc74d971531ac6f5b626","size":3975,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/event-to-promise/-/event-to-promise-0.8.0.tgz"},"maintainers":[{"name":"anonymous","email":"julien.fontanet@isonoe.net"},{"name":"anonymous","email":"marsaud.fabrice@neuf.fr"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/event-to-promise-0.8.0.tgz_1488363126235_0.6357920065056533"},"directories":{},"publish_time":1488363128044,"_cnpm_publish_time":1488363128044,"_hasShrinkwrap":false,"contributors":[]},"0.7.0":{"name":"event-to-promise","version":"0.7.0","license":"MIT","description":"Create a promise waiting for an event","keywords":["event","promise"],"homepage":"https://github.com/julien-f/event-to-promise","bugs":{"url":"https://github.com/julien-f/event-to-promise/issues"},"author":{"name":"Julien Fontanet","email":"julien.fontanet@isonoe.net","url":"http://julien.isonoe.net"},"repository":{"type":"git","url":"git+https://github.com/julien-f/event-to-promise.git"},"devDependencies":{"mocha":"^2.2.5","must":"^0.13.1","native-promise-only":"^0.8.1","standard":"^6.0.4"},"scripts":{"lint":"standard","posttest":"npm run lint","test":"mocha index.spec.js"},"files":["index.js"],"gitHead":"f2c42c58122e164df791e181f511fa0c492c04d5","_id":"event-to-promise@0.7.0","_shasum":"cb07dfcd418da2221d90f77eab713bc235e2090f","_from":".","_npmVersion":"3.7.1","_nodeVersion":"4.2.4","_npmUser":{"name":"anonymous","email":"julien.fontanet@isonoe.net"},"dist":{"shasum":"cb07dfcd418da2221d90f77eab713bc235e2090f","size":3028,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/event-to-promise/-/event-to-promise-0.7.0.tgz"},"maintainers":[{"name":"anonymous","email":"julien.fontanet@isonoe.net"},{"name":"anonymous","email":"marsaud.fabrice@neuf.fr"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/event-to-promise-0.7.0.tgz_1455102751333_0.8384387281257659"},"directories":{},"publish_time":1455102754446,"_cnpm_publish_time":1455102754446,"_hasShrinkwrap":false,"contributors":[]},"0.6.0":{"name":"event-to-promise","version":"0.6.0","license":"MIT","description":"Create a promise waiting for an event","keywords":["event","promise"],"homepage":"https://github.com/julien-f/event-to-promise","bugs":{"url":"https://github.com/julien-f/event-to-promise/issues"},"author":{"name":"Julien Fontanet","email":"julien.fontanet@isonoe.net","url":"http://julien.isonoe.net"},"repository":{"type":"git","url":"git+https://github.com/julien-f/event-to-promise.git"},"dependencies":{"any-promise":"^0.1.0"},"devDependencies":{"mocha":"^2.2.5","must":"^0.13.1","native-promise-only":"^0.8.1"},"scripts":{"test":"mocha index.spec.js"},"files":["index.js"],"gitHead":"37ec3aca291c67b43725b61ab906e83df309a14d","_id":"event-to-promise@0.6.0","_shasum":"223e05d59aa0034f13d53fe1d8a3be63391aa992","_from":".","_npmVersion":"3.4.1","_nodeVersion":"4.2.2","_npmUser":{"name":"anonymous","email":"julien.fontanet@isonoe.net"},"dist":{"shasum":"223e05d59aa0034f13d53fe1d8a3be63391aa992","size":2767,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/event-to-promise/-/event-to-promise-0.6.0.tgz"},"maintainers":[{"name":"anonymous","email":"julien.fontanet@isonoe.net"},{"name":"anonymous","email":"marsaud.fabrice@neuf.fr"}],"directories":{},"publish_time":1448970433837,"_cnpm_publish_time":1448970433837,"_hasShrinkwrap":false,"contributors":[]},"0.5.0":{"name":"event-to-promise","version":"0.5.0","license":"MIT","description":"Create a promise waiting for an event","keywords":["event","promise"],"homepage":"https://github.com/julien-f/event-to-promise","bugs":{"url":"https://github.com/julien-f/event-to-promise/issues"},"author":{"name":"Julien Fontanet","email":"julien.fontanet@isonoe.net","url":"http://julien.isonoe.net"},"repository":{"type":"git","url":"git+https://github.com/julien-f/event-to-promise.git"},"dependencies":{"any-promise":"^0.1.0"},"devDependencies":{"mocha":"^2.2.5","must":"^0.13.1","native-promise-only":"^0.8.1"},"scripts":{"test":"mocha index.spec.js"},"files":["index.js"],"gitHead":"91b3c4058406ce326abd8e4a6487a44d1b048fca","_id":"event-to-promise@0.5.0","_shasum":"e9e4d395ff3e87b4d75f8597c3512c6e7dd7cd28","_from":".","_npmVersion":"3.4.1","_nodeVersion":"4.2.2","_npmUser":{"name":"anonymous","email":"julien.fontanet@isonoe.net"},"dist":{"shasum":"e9e4d395ff3e87b4d75f8597c3512c6e7dd7cd28","size":2707,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/event-to-promise/-/event-to-promise-0.5.0.tgz"},"maintainers":[{"name":"anonymous","email":"julien.fontanet@isonoe.net"},{"name":"anonymous","email":"marsaud.fabrice@neuf.fr"}],"directories":{},"publish_time":1448885896248,"_cnpm_publish_time":1448885896248,"_hasShrinkwrap":false,"contributors":[]},"0.4.0":{"name":"event-to-promise","version":"0.4.0","license":"MIT","description":"Create a promise waiting for an event","keywords":["event","promise"],"homepage":"https://github.com/julien-f/event-to-promise","bugs":{"url":"https://github.com/julien-f/event-to-promise/issues"},"author":{"name":"Julien Fontanet","email":"julien.fontanet@isonoe.net","url":"http://julien.isonoe.net"},"repository":{"type":"git","url":"git+https://github.com/julien-f/event-to-promise.git"},"dependencies":{"bluebird":"^2.2.2"},"devDependencies":{"chai":"^2.3.0","mocha":"^2.2.5"},"scripts":{"test":"mocha index.spec.js"},"files":["index.js"],"gitHead":"737580bfaa8c46dfe4c9557faa946bbf07fff145","_id":"event-to-promise@0.4.0","_shasum":"905b05b3ff59536007e7b37f40d199ef03ca037c","_from":".","_npmVersion":"2.14.0","_nodeVersion":"0.10.40","_npmUser":{"name":"anonymous","email":"julien.fontanet@isonoe.net"},"dist":{"shasum":"905b05b3ff59536007e7b37f40d199ef03ca037c","size":2602,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/event-to-promise/-/event-to-promise-0.4.0.tgz"},"maintainers":[{"name":"anonymous","email":"julien.fontanet@isonoe.net"},{"name":"anonymous","email":"marsaud.fabrice@neuf.fr"}],"directories":{},"publish_time":1440430611512,"_cnpm_publish_time":1440430611512,"_hasShrinkwrap":false,"contributors":[]},"0.3.3":{"name":"event-to-promise","version":"0.3.3","license":"MIT","description":"Create a promise waiting for an event","keywords":["event","promise"],"homepage":"https://github.com/julien-f/event-to-promise","bugs":{"url":"https://github.com/julien-f/event-to-promise/issues"},"author":{"name":"Julien Fontanet","email":"julien.fontanet@isonoe.net","url":"http://julien.isonoe.net"},"repository":{"type":"git","url":"git+https://github.com/julien-f/event-to-promise.git"},"dependencies":{"bluebird":"^2.2.2"},"devDependencies":{"chai":"^2.3.0","mocha":"^2.2.5"},"scripts":{"test":"mocha index.spec.js"},"files":["index.js"],"gitHead":"f6e3973b2901b5c67e599ecc1cc6e8a0ce026d21","_id":"event-to-promise@0.3.3","_shasum":"03fca02311310f8fefc99ac54a5c532cb69484eb","_from":".","_npmVersion":"2.10.0","_nodeVersion":"0.12.3","_npmUser":{"name":"anonymous","email":"julien.fontanet@isonoe.net"},"maintainers":[{"name":"anonymous","email":"julien.fontanet@isonoe.net"},{"name":"anonymous","email":"marsaud.fabrice@neuf.fr"}],"dist":{"shasum":"03fca02311310f8fefc99ac54a5c532cb69484eb","size":2362,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/event-to-promise/-/event-to-promise-0.3.3.tgz"},"directories":{},"publish_time":1432467263440,"_cnpm_publish_time":1432467263440,"_hasShrinkwrap":false,"contributors":[]},"0.3.2":{"name":"event-to-promise","version":"0.3.2","license":"MIT","description":"Create a promise waiting for an event","keywords":["event","promise"],"homepage":"https://github.com/julien-f/event-to-promise","bugs":{"url":"https://github.com/julien-f/event-to-promise/issues"},"author":{"name":"Julien Fontanet","email":"julien.fontanet@isonoe.net","url":"http://julien.isonoe.net"},"repository":{"type":"git","url":"https://github.com/julien-f/event-to-promise"},"dependencies":{"bluebird":"^2.2.2"},"devDependencies":{"chai":"^1.9.1","mocha":"^1.21.3"},"scripts":{"test":"mocha index.spec.js"},"files":["index.js"],"gitHead":"6c736c056b381c79f838886c888c1b3a27090e6e","_id":"event-to-promise@0.3.2","_shasum":"35f0a54385759c259d022c9fcd5aa22362405842","_from":".","_npmVersion":"2.1.2","_nodeVersion":"0.10.32","_npmUser":{"name":"anonymous","email":"julien.fontanet@isonoe.net"},"maintainers":[{"name":"anonymous","email":"julien.fontanet@isonoe.net"},{"name":"anonymous","email":"marsaud.fabrice@neuf.fr"}],"dist":{"shasum":"35f0a54385759c259d022c9fcd5aa22362405842","size":1588,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/event-to-promise/-/event-to-promise-0.3.2.tgz"},"directories":{},"publish_time":1412748471725,"_cnpm_publish_time":1412748471725,"_hasShrinkwrap":false,"contributors":[]},"0.3.1":{"name":"event-to-promise","version":"0.3.1","license":"MIT","description":"Create a promise waiting for an event","keywords":["event","promise"],"homepage":"https://github.com/julien-f/event-to-promise","bugs":{"url":"https://github.com/julien-f/event-to-promise/issues"},"author":{"name":"Julien Fontanet","email":"julien.fontanet@isonoe.net","url":"http://julien.isonoe.net"},"repository":{"type":"git","url":"https://github.com/julien-f/event-to-promise"},"dependencies":{"bluebird":"^2.2.2"},"devDependencies":{"chai":"^1.9.1","mocha":"^1.21.3"},"scripts":{"test":"mocha index.spec.js"},"files":["index.js"],"_id":"event-to-promise@0.3.1","_shasum":"242b6d090561c1dac4bb291a6763116bde0f16d7","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"anonymous","email":"julien.fontanet@isonoe.net"},"maintainers":[{"name":"anonymous","email":"julien.fontanet@isonoe.net"},{"name":"anonymous","email":"marsaud.fabrice@neuf.fr"}],"dist":{"shasum":"242b6d090561c1dac4bb291a6763116bde0f16d7","size":1571,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/event-to-promise/-/event-to-promise-0.3.1.tgz"},"directories":{},"publish_time":1406841690698,"_cnpm_publish_time":1406841690698,"_hasShrinkwrap":false,"contributors":[]},"0.3.0":{"name":"event-to-promise","version":"0.3.0","license":"MIT","description":"Create a promise waiting for an event","keywords":["event","promise"],"homepage":"https://github.com/julien-f/event-to-promise","bugs":{"url":"https://github.com/julien-f/event-to-promise/issues"},"author":{"name":"Julien Fontanet","email":"julien.fontanet@isonoe.net","url":"http://julien.isonoe.net"},"repository":{"type":"git","url":"https://github.com/julien-f/event-to-promise"},"dependencies":{"bluebird":"^2.0.7"},"devDependencies":{"chai":"^1.9.1","mocha":"^1.20.1"},"scripts":{"test":"mocha index.spec.js"},"files":["index.js"],"gitHead":"afe9dfd8d87c46725c35b83f6732f6a8685a23dd","_id":"event-to-promise@0.3.0","_shasum":"5257413faf5db39a4d43b4fe3f206c13dc783027","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"anonymous","email":"julien.fontanet@isonoe.net"},"maintainers":[{"name":"anonymous","email":"julien.fontanet@isonoe.net"},{"name":"anonymous","email":"marsaud.fabrice@neuf.fr"}],"dist":{"shasum":"5257413faf5db39a4d43b4fe3f206c13dc783027","size":1463,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/event-to-promise/-/event-to-promise-0.3.0.tgz"},"directories":{},"publish_time":1402320355122,"_cnpm_publish_time":1402320355122,"_hasShrinkwrap":false,"contributors":[]},"0.2.4":{"name":"event-to-promise","version":"0.2.4","license":"MIT","description":"Create a promise waiting for an event","keywords":["event","promise"],"homepage":"https://github.com/julien-f/event-to-promise","bugs":{"url":"https://github.com/julien-f/event-to-promise/issues"},"author":{"name":"Julien Fontanet","email":"julien.fontanet@isonoe.net","url":"http://julien.isonoe.net"},"repository":{"type":"git","url":"https://github.com/julien-f/event-to-promise"},"dependencies":{"bluebird":"^1.2.4"},"devDependencies":{"chai":"^1.9.1","mocha":"^1.19.0"},"scripts":{"test":"mocha index.spec.js"},"files":["index.js"],"_id":"event-to-promise@0.2.4","_shasum":"4f830aafc624354a31de53bb127897ca44664214","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"anonymous","email":"julien.fontanet@isonoe.net"},"maintainers":[{"name":"anonymous","email":"julien.fontanet@isonoe.net"},{"name":"anonymous","email":"marsaud.fabrice@neuf.fr"}],"dist":{"shasum":"4f830aafc624354a31de53bb127897ca44664214","size":1456,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/event-to-promise/-/event-to-promise-0.2.4.tgz"},"directories":{},"publish_time":1400775582659,"_cnpm_publish_time":1400775582659,"_hasShrinkwrap":false,"contributors":[]},"0.2.3":{"name":"event-to-promise","version":"0.2.3","license":"MIT","description":"Create a promise waiting for an event","keywords":["event","promise"],"homepage":"https://github.com/julien-f/event-to-promise","bugs":{"url":"https://github.com/julien-f/event-to-promise/issues"},"author":{"name":"Julien Fontanet","email":"julien.fontanet@isonoe.net","url":"http://julien.isonoe.net"},"repository":{"type":"git","url":"https://github.com/julien-f/event-to-promise"},"dependencies":{"bluebird":"^1.2.4"},"devDependencies":{"chai":"^1.9.1","mocha":"^1.19.0"},"scripts":{"test":"mocha index.spec.js"},"_id":"event-to-promise@0.2.3","dist":{"shasum":"435865937c1027e9d35e680b1e9a35fe0b0cbb86","size":5491,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/event-to-promise/-/event-to-promise-0.2.3.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"anonymous","email":"julien.fontanet@isonoe.net"},"maintainers":[{"name":"anonymous","email":"julien.fontanet@isonoe.net"},{"name":"anonymous","email":"marsaud.fabrice@neuf.fr"}],"directories":{},"publish_time":1400406981169,"_cnpm_publish_time":1400406981169,"_hasShrinkwrap":false,"contributors":[]},"0.2.2":{"name":"event-to-promise","version":"0.2.2","license":"MIT","description":"Create a promise waiting for an event","keywords":["event","promise"],"homepage":"https://github.com/julien-f/event-to-promise","bugs":{"url":"https://github.com/julien-f/event-to-promise/issues"},"author":{"name":"Julien Fontanet","email":"julien.fontanet@isonoe.net","url":"http://julien.isonoe.net"},"repository":{"type":"git","url":"https://github.com/julien-f/event-to-promise"},"dependencies":{"bluebird":"^1.2.2"},"devDependencies":{"chai":"^1.9.1","mocha":"^1.18.2"},"scripts":{"test":"mocha index.spec.js"},"_id":"event-to-promise@0.2.2","_shasum":"670832c217edf7cf447a6a0d2c697d0531b03db8","_from":".","_npmVersion":"1.4.7","_npmUser":{"name":"anonymous","email":"julien.fontanet@isonoe.net"},"maintainers":[{"name":"anonymous","email":"julien.fontanet@isonoe.net"},{"name":"anonymous","email":"marsaud.fabrice@neuf.fr"}],"dist":{"shasum":"670832c217edf7cf447a6a0d2c697d0531b03db8","size":5506,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/event-to-promise/-/event-to-promise-0.2.2.tgz"},"directories":{},"publish_time":1397919444842,"_cnpm_publish_time":1397919444842,"_hasShrinkwrap":false,"contributors":[]},"0.2.1":{"name":"event-to-promise","version":"0.2.1","license":"MIT","description":"Create a promise waiting for an event","keywords":["event","promise"],"homepage":"https://github.com/julien-f/event-to-promise","bugs":{"url":"https://github.com/julien-f/event-to-promise/issues"},"author":{"name":"Julien Fontanet","email":"julien.fontanet@isonoe.net","url":"http://julien.isonoe.net"},"repository":{"type":"git","url":"https://github.com/julien-f/event-to-promise"},"dependencies":{"bluebird":"^1.2.2"},"devDependencies":{"chai":"^1.9.1","mocha":"^1.18.2"},"scripts":{"test":"mocha index.spec.js"},"_id":"event-to-promise@0.2.1","dist":{"shasum":"c9a7d86f9a741c69170d0129074564d95432f9ff","size":5509,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/event-to-promise/-/event-to-promise-0.2.1.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"anonymous","email":"julien.fontanet@isonoe.net"},"maintainers":[{"name":"anonymous","email":"julien.fontanet@isonoe.net"},{"name":"anonymous","email":"marsaud.fabrice@neuf.fr"}],"directories":{},"publish_time":1397643045412,"_cnpm_publish_time":1397643045412,"_hasShrinkwrap":false,"contributors":[]},"0.2.0":{"name":"event-to-promise","version":"0.2.0","license":"MIT","description":"Create a promise waiting for an event","keywords":["password","hash"],"homepage":"https://github.com/julien-f/event-to-promise","bugs":{"url":"https://github.com/julien-f/event-to-promise/issues"},"author":{"name":"Julien Fontanet","email":"julien.fontanet@isonoe.net","url":"http://julien.isonoe.net"},"repository":{"type":"git","url":"https://github.com/julien-f/event-to-promise"},"dependencies":{"bluebird":"^1.2.2"},"devDependencies":{"chai":"^1.9.1","mocha":"^1.18.2"},"scripts":{"test":"mocha index.spec.js"},"_id":"event-to-promise@0.2.0","dist":{"shasum":"ee4fac90aec4e65a31993246a710ce9127860928","size":5513,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/event-to-promise/-/event-to-promise-0.2.0.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"anonymous","email":"julien.fontanet@isonoe.net"},"maintainers":[{"name":"anonymous","email":"julien.fontanet@isonoe.net"},{"name":"anonymous","email":"marsaud.fabrice@neuf.fr"}],"directories":{},"publish_time":1397552404086,"_cnpm_publish_time":1397552404086,"_hasShrinkwrap":false,"contributors":[]},"0.1.0":{"name":"event-to-promise","version":"0.1.0","license":"MIT","description":"Create a promise waiting for an event","keywords":["password","hash"],"homepage":"https://github.com/julien-f/event-to-promise","bugs":{"url":"https://github.com/julien-f/event-to-promise/issues"},"author":{"name":"Julien Fontanet","email":"julien.fontanet@isonoe.net","url":"http://julien.isonoe.net"},"repository":{"type":"git","url":"https://github.com/julien-f/event-to-promise"},"dependencies":{"bluebird":"^1.2.2"},"devDependencies":{"chai":"^1.9.1","mocha":"^1.18.2"},"scripts":{"test":"mocha index.spec.js"},"_id":"event-to-promise@0.1.0","dist":{"shasum":"6eece09fc806a47d3dd0812468abbc84ee29970e","size":5383,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/event-to-promise/-/event-to-promise-0.1.0.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"anonymous","email":"julien.fontanet@isonoe.net"},"maintainers":[{"name":"anonymous","email":"julien.fontanet@isonoe.net"},{"name":"anonymous","email":"marsaud.fabrice@neuf.fr"}],"directories":{},"publish_time":1397386235815,"_cnpm_publish_time":1397386235815,"_hasShrinkwrap":false,"contributors":[]}},"dist-tags":{"latest":"0.8.0"},"name":"event-to-promise","time":{"modified":"2023-08-01T23:09:31.335Z","created":"2022-01-26T17:42:22.268Z","0.8.0":"2017-03-01T10:12:08.044Z","0.7.0":"2016-02-10T11:12:34.446Z","0.6.0":"2015-12-01T11:47:13.837Z","0.5.0":"2015-11-30T12:18:16.248Z","0.4.0":"2015-08-24T15:36:51.512Z","0.3.3":"2015-05-24T11:34:23.440Z","0.3.2":"2014-10-08T06:07:51.725Z","0.3.1":"2014-07-31T21:21:30.698Z","0.3.0":"2014-06-09T13:25:55.122Z","0.2.4":"2014-05-22T16:19:42.659Z","0.2.3":"2014-05-18T09:56:21.169Z","0.2.2":"2014-04-19T14:57:24.842Z","0.2.1":"2014-04-16T10:10:45.412Z","0.2.0":"2014-04-15T09:00:04.086Z","0.1.0":"2014-04-13T10:50:35.815Z"},"readme":"# event-to-promise\n\n[![Build Status](https://img.shields.io/travis/JsCommunity/event-to-promise/master.svg)](http://travis-ci.org/JsCommunity/event-to-promise)\n[![Dependency Status](https://david-dm.org/JsCommunity/event-to-promise/status.svg?theme=shields.io)](https://david-dm.org/JsCommunity/event-to-promise)\n[![devDependency Status](https://david-dm.org/JsCommunity/event-to-promise/dev-status.svg?theme=shields.io)](https://david-dm.org/JsCommunity/event-to-promise#info=devDependencies)\n\n> Create a promise waiting for an event\n\n## Installation\n\n### Node & [Browserify](http://browserify.org/)/[Webpack](https://webpack.js.org/)\n\nInstallation of the [npm package](https://npmjs.org/package/event-to-promise):\n\n```\n> npm install --save event-to-promise\n```\n\nThen require the package:\n\n```javascript\nvar eventToPromise = require('event-to-promise');\n```\n\n### Browser\n\nYou can directly use the build provided at [unpkg.com](https://unpkg.com):\n\n```html\n<script src=\"https://unpkg.com/event-to-promise@0.8/dist/event-to-promise.js\"></script>\n```\n\n## Example\n\n```javascript\nfunction createServer (port) {\n  var server = require('http').createServer()\n  server.listen(port)\n\n  // The server will be returned once it has started listening.\n  //\n  // If an error happened, it will be forwarded instead.\n  return eventToPromise(server, 'listening').then(function () {\n    return server\n  })\n}\n\n// Using plain promise.\ncreateServer(80).then(function (server) {\n  console.log('Server listening on http://localhost:80/')\n}).catch(function (error) {\n  console.error('Server could not start:', error)\n})\n```\n\nEvent better using [ES2016 asynchronous functions](https://github.com/tc39/ecmascript-asyncawait):\n\n```js\nasync function createServer (port) {\n  var server = require('http').createServer()\n  server.listen(port)\n\n  await eventToPromise(server, 'listening')\n\n  return server\n}\n\nasync function main () {\n  try {\n    const server = await createServer(80);\n    console.log('Server listening on http://localhost:80/');\n  } catch (error) {\n    console.error('Server could not start:', error);\n  }\n}\n\nmain()\n```\n\n## API\n\nThis library requires promises support, for Node versions prior to 0.12 [see\nthis page](https://github.com/JsCommunity/js-promise-toolbox#usage) to\nenable them.\n\n### eventToPromise(emitter, event, [options]) => Promise\n\n> Wait for one event. The first parameter of the emitted event is used\n> to resolve/reject the promise.\n\nThe returned promise has a `cancel()` method which can be used to\nremove the event listeners. Note that the promise will never settled\nif canceled.\n\n```js\nconst promise = eventToPromise(emitter, 'foo')\npromise.cancel()\n```\n\n#### emitter\n\n*Required*\nType: `Object`\n\nThe event emitter you want to watch an event on.\n\n#### event\n\n*Required*\nType: `string`\n\nThe name of the event you want to watch.\n\n#### options\n\n##### array\n\nType: `boolean`\nDefault: `false`\n\nIf true, all parameters of the emitted events are put in an array which is used to resolve/reject the promise.\n\n##### error\n\nType: `string`\nDefault: `\"error\"`\n\nThe name of the event which rejects the promise.\n\n##### ignoreErrors\n\nType: `boolean`\nDefault: `false`\n\nWhether the error event should be ignored and not reject the promise.\n\n### eventToPromise.multi(emitter, successEvents, errorEvents) => Promise\n\n> Wait for one of multiple events. The array of all the parameters of\n> the emitted event is used to resolve/reject the promise.\n>\n> The array also has an `event` property indicating which event has\n> been emitted.\n\nThe returned promise has a `cancel()` method which can be used to\nremove the event listeners. Note that the promise will never settled\nif canceled.\n\n```js\nconst promise = eventToPromise(emitter, 'foo')\npromise.cancel()\n```\n\n#### emitter\n\n*Required*\nType: `Object`\n\nThe event emitter you want to watch an event on.\n\n#### successEvents\n\n*Required*\nType: `Array<string>`\n\nThe names of the events which resolve the promise.\n\n#### errorEvents\n\nType: `Array<string>`\nDefault: `[ 'error' ]`\n\nThe names of the events which reject the promise.\n\n\n## Contributing\n\nContributions are *very* welcome, either on the documentation or on\nthe code.\n\nYou may:\n\n- report any [issue](https://github.com/JsCommunity/event-to-promise/issues)\n  you've encountered;\n- fork and create a pull request.\n\n## License\n\nISC © [Julien Fontanet](http://julien.isonoe.net)","users":{}}