node-bus
An event bus with wildcard matching
Last updated 13 years ago by dyoder .
BSD · Repository · Original npm · Tarball · package.json
$ cnpm install node-bus 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 0.3.4                                ...           latest (13 years ago)

7 Versions

  • 0.3.4                                ...           13 years ago
  • 0.3.3 [deprecated]           ...           13 years ago
  • 0.3.2                                ...           13 years ago
  • 0.3.1                                ...           13 years ago
  • 0.3.0                                ...           13 years ago
  • 0.2.0                                ...           13 years ago
  • 0.1.0                                ...           13 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (2)
Dev Dependencies (1)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |