npm.io
0.2.0 • Published 6 years ago

@dalisoft/events

Licence
MIT
Version
0.2.0
Deps
1
Size
13 kB
Vulns
0
Weekly
0

events

Greenkeeper badge

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

Keywords