just-event-bus

1.1.0 • Public • Published

Simple Event Bus for javascript that just works

const fn = (text) => console.log(text);
EventBus.on("foo", fn);

EventBus.emit("foo", "Hello World!"); // => Hello World!

Also it supports arrays:

const fn = (text) => console.log(text);
EventBus.on(["foo", "bar"], [fn]);

EventBus.emit("foo", "Hello!"); // => Hello!
EventBus.emit("bar", "World!"); // => World!

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    2
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i just-event-bus

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

6.11 kB

Total Files

7

Last publish

Collaborators

  • proton2