The blazing fast ES6 event library.
Evee is a lightweight event library, written in clean ECMAScript6.
Evee exports both an ES5 and an ES6 version to support a wide range of clients.
From version 2.0.0, evee exports two entry points:
evee export is what you're used to, and will work with all ES5 compatible targets.
evee/es6 export is the ES6 version of evee, which is generally faster.
If you wanna keep using the ES5 version, you don't need to change anything!
If you wanna upgrade to the beautiful ES6 version, here's how to do it:
// Importing evee/es6 (require)const Evee =evee = ;// Importing evee/es6 (ES6 modules);const evee = ;
The project is still actively maintained, but the functionality is complete.
Bugs will still be fixed and feature requests are more than welcome.
// Grab a new evee instanceconst Evee =evee = ;// Subscribe to the 'update' eventevee;var ticks = 0;whiletrue// Dispatch the 'update' eventevee;
You can also keep track of your event listeners unsubscribe from events you don't need anymore.
// Grab a new evee instanceconst Evee =evee = ;// Subscribe to the 'say' eventvar receiver = evee;// Dispatch the 'say' eventevee;// Unsubscribe from the 'say' eventevee;
If you want to fire an event only once, you can do that too!
The event will be automatically removed after the first usage:
// Grab a new evee instanceconst Evee =evee = ;// Subscribe to the 'say' eventevee;// Dispatch the 'say' event two timesevee;evee;// hello, world is only printed once!
As you can see, evee is really easy to use!
Start using evee today and stop worrying about slow events :)
$ git clone firstname.lastname@example.org:SplittyDev/evee.js.git$ cd evee.js$ npm install --only=dev$ npm run-script bench-dev