Socket
Book a DemoInstallSign in
Socket

@nodeart/observable

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nodeart/observable

Simple Observable pattern

latest
npmnpm
Version
1.0.15
Version published
Maintainers
1
Created
Source

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:

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

Keywords

observable

FAQs

Package last updated on 23 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts