Socket
Socket
Sign inDemoInstall

vigour-is

Package Overview
Dependencies
30
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vigour-is

"is" api for observables (observes until a value fulfils conditions) build-in promise support


Version published
Maintainers
1
Install size
4.30 MB
Created

Readme

Source

vigour-is

Build Status js-standard-style npm version Coverage Status

.is api for observables (observes until a value fulfils conditions)

  // add a once listener
  obs.is('something', () => {
    console.log('fire!')
  })

  // fire!
  obs.set('something')

  // fire immediatly
  obs.is('something', (data, stamp, target) => {
    console.log('fire!')
  })

  // fire immmediatly, as a promise
  obs.is('something').then(() => {
    console.log('fire')
  })

  // fire immmediatly, as a promise
  obs.is('something').then((target, data, stamp) => {
    console.log('fire', target, data, stamp)
  })

  // use a compare function
  obs.is((val, data, stamp, target) => val === 'hello')
    .then((target, data, stamp) => {
      console.log('fire', target, data, stamp)
    })

Keywords

FAQs

Last updated on 20 Oct 2016

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc