@dalisoft/events
v0.2.0
Published
One more event emitter for Node.js and browser
Downloads
260
Readme
events
One more event emitter for Node.js and browser
Features
- Performant
- Easy
- UMD compatible
Installation
We recommend install via npm
because of it's cache and flat node modules tree
npm i @dalisoft/events
then you able to import to Node.js/Browser easily
// Node.js
const Events = require("@dalisoft/events");
// Browser
// window.Events OR Events
// ES6
import Events from "@dalisoft/events";
Usage
const ev = new Events();
ev.on("hello", name => console.log("Hello ", name));
ev.emit("hello", "world");
License
MIT