New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rxjs-pubsub

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rxjs-pubsub

A simple pubsub using rxjs

latest
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

#rxjs-pubsub

Out of the box, rxjs doesn't really have a good publish-subscription data structure for you to use.

//1. create a publisher
var eventbus = pubsub.create();

//2. subscribe to publisher
eventbus("foo").subscribe((o)=>console.log(o));

//3. publish to a subscriber
eventbus.publish("foo","bar")

It's that easy!

#Install

npm install rxjs-pubsub

or

<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/4.1.0/rx.all.js"></script>
<script src="https://cdn.rawgit.com/richardanaya/rxjs-pubsub/master/rxjs-pubsub.js"></script>

#Additional Details

This may seem like a simple library you may want to make yourself! Keep in mind that rxjs streams out of the box don't handle errors or completion very well for this type of setup. Keep the power of rxjs and checkout the code how I handled this!

Keywords

rxjs

FAQs

Package last updated on 09 Apr 2016

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