events-emitter-lighter

1.0.0 • Public • Published

INSTALL

npm i -S events-emitter-lighter

USAGE

const Events = require('events-emitter-lighter')
const myEvent = new Events()
function log (...args) {
    console.log(args)
}
myEvent.on('msg', log)
myEvent.emit('msg', 'hello', 'node') // ['hello', 'node']
myEvent.remove('msg', log)
myEvent.once('greet', () => { console.log('hello world') })
myEvent.emit('greet') // 'hello world'

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i events-emitter-lighter

      Weekly Downloads

      0

      Version

      1.0.0

      License

      ISC

      Unpacked Size

      1.36 kB

      Total Files

      3

      Last publish

      Collaborators

      • mychaos95