novad-eventbus

1.0.0Β β€’Β PublicΒ β€’Β Published

novad-eventbus

🚌

installation

npm install novad-eventbus

usage

import bus from 'novad-eventbus'
// register:
bus.on('channel', () => {})

// emit
bus.emit('channel')

// remove specified function
bus.remove('channel',fn)

// remove all functiono in specified channel
bus.remove('channel')

// review all registed events
bus.list() //{a:[fn1, fn2...], channel1: [fn1, fn2...],...}

// clear all events
bus.clear()

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i novad-eventbus

    Weekly Downloads

    3

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    4.28 kB

    Total Files

    4

    Last publish

    Collaborators

    • novadev