New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

observavir

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

observavir

flexible observables

  • 2.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

observavir

Flexible and simple observables with multiple implementations.

Supports CJS and ESM import.

install

npm i observavir

usage

Full docs: https://electrovir.github.io/observavir

All observables have a .value property for accessing the current value and a .listen() method for attaching callbacks to value updates.

Several different observable classes are exported from this package:

  • Observable: Bare bones basic observable. Can be listened to and its value can be updated with .setValue().
  • AsyncObservable: If given a Promise, it will update value (and listeners) when the Promise is set and then resolved or rejected so you can track and even await the Promises. Also includes a lastResolvedValue for anything that does't care about the Promise lifecycle.
  • CallbackObservable: A sub-class of AsyncObservable that accepts a callback for triggering updates of value.
  • IntervalObservable: A sub-class of CallbackObservable that will automatically update itself at a give internal rate.

Keywords

FAQs

Package last updated on 19 Feb 2025

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc