Package Exports
- asynchronous-eventemitter
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (asynchronous-eventemitter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
asynchronous-eventemitter
Asynchronous version of EventEmitter, secured by promises
Installation
$ npm install asynchronous-eventemitter
Doc
- see node events documentation
on("eventerror", () => { try {} catch(e) { console.log(e); } }) : return this
fire if an error has thrown in a callback
note : use a "try/catch" in "eventerror" event to avoid loop
Examples
const events = require('asynchronous-eventemitter');
new events().on("eventerror", function(err) {
console.log(err);
}).on("test", function(arg1, arg2, arg3) {
console.log(arg1, arg2, arg3);
}).emit("test", "arg1", "arg2", "arg3");
Tests
$ gulp