Socket
Book a DemoInstallSign in
Socket

wildcards

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wildcards

emitter wildcard support

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
61
27.08%
Maintainers
1
Weekly downloads
 
Created
Source

wildcards

Wildcard event-emitter proxy for nodejs.

Installation

$ npm install wildcards
$ component install segmentio/wildcards

Example

var Emitter = require('events').EventEmitter;
var events = require('wildcards');

var app = new Emitter;

events(app, 'user:*', function(event, user){
  console.log('  %s %s', event, user);
});

app.emit('foo');
app.emit('bar');
app.emit('user:logout', 'tobi');
app.emit('user:login', 'loki');
app.emit('user:login', 'jane');

Yielding:

user:logout tobi
user:login loki
user:login jane

License

MIT

Keywords

events

FAQs

Package last updated on 10 Apr 2014

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