🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

node-bus

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

node-bus

An event bus with wildcard matching

0.3.4
latest
npm
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

Get On The Bus

Bus is like Event Emitter, except with wildcard matching. The purpose is to allow co-operating components to share a single event bus by effectively making it possible to namespace the events on the bus and for client code to subscribe to "families" of events.

Bus = require "./bus"
bus = new Bus
bus.on "*.error", (error) -> 
  {name,message} = error
  console.log "#{name}: #{message}"
bus.emit "foo.bar.error", new Error "Ruh-roh!"

Installation

Just use npm:

npm install bus

Status

Early development. Currently, the package is set up for use with CoffeeScript.

Keywords

events

FAQs

Package last updated on 28 Nov 2012

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