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

emitter-pubsub-broker

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emitter-pubsub-broker

An utility for connecting EventEmitters via a pubsub.

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

emitter-pubsub-broker

NPM Version Build Status Appveyor status Coverage Status Dependency Status JavaScript Style Guide

An utility for connecting EventEmitters via a pubsub. Includes Redis and in-memory backends, and a support of other systems can be added by implementing a very simple Connector wrapper.

Table of Contents

Installation

$ npm i emitter-pubsub-broker

Usage

const EmitterPubsubBroker = require('emitter-pubsub-broker')
const connect = 'redis://localhost:6379' // or empty for in-memory backend

let broker = new EmitterPubsubBroker(connect)
let client = new EventEmitter() // anything that implements the interface

client.on('myEvent', (...args) => { /* handler code */ })

broker.subscribe(client, 'my-channel')
  .then(() => broker.publish('my-channel', 'myEvent', ...args))

API

API documentation is available online.

Contribute

If you encounter a bug in this package, please submit a bug report to github repo issues.

PRs are also accepted.

License

MIT

Keywords

FAQs

Package last updated on 21 Oct 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

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