Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

any-observable

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

any-observable

Support any Observable library and polyfill

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.6M
increased by62.28%
Maintainers
1
Weekly downloads
 
Created

What is any-observable?

The any-observable package allows you to register an Observable library of your choice and use it throughout your application as a singleton. This means you can use Observables without being locked into a specific library, providing flexibility in your codebase.

What are any-observable's main functionalities?

Registering a specific Observable implementation

This feature allows you to register an Observable implementation that will be used whenever you import 'any-observable'.

const anyObservable = require('any-observable');
anyObservable.register('rxjs'); // or 'zen-observable', etc.

Using the registered Observable

Once an Observable library is registered, you can create and use Observables as you would normally with that library.

const Observable = require('any-observable');
const stream = new Observable(observer => {
  observer.next('Hello, World!');
  observer.complete();
});

stream.subscribe({
  next: console.log,
  complete: () => console.log('Stream finished')
});

Other packages similar to any-observable

Keywords

FAQs

Package last updated on 19 Apr 2018

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