@nodeart/observable

1.0.15 • Public • Published

bitHound Overall Score bitHound Dependencies bitHound Code

DEPRECATED

Please, use https://www.npmjs.com/package/@nodeart/event_emitter instead.

Methods:

observable.on(eventName, ...fns)
observable.once(eventName, ...fns)
observable.unbind(eventName, ...fns) 
observable.unbindAll()
// One can remove some functions from listeners array,
// but to remove all listeners (read 'remove event'), one can pass
// only eventName to .unbind method
observable.emit(eventName, ...args)

Features:

  1. any number of functions can be put as listeners
  2. chaining available
  3. written with ES6 syntax
  4. can be used in node.js and in browser

/@nodeart/observable/

    Package Sidebar

    Install

    npm i @nodeart/observable

    Weekly Downloads

    1

    Version

    1.0.15

    License

    MIT

    Last publish

    Collaborators

    • ivan-tymoshenko
    • nodeartio