Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A node event bus with wildcard matching
CoffeeScript
tag: 0.3.2

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
benchmarks
.gitignore
benchmark.coffee
bus.coffee
example.coffee
package.json
readme.md
test.coffee

readme.md

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.

Something went wrong with that request. Please try again.