on-everything
Catch every event an EventEmitter publishes
Last updated 11 years ago by stephenplusplus .
MIT · Original npm · Tarball · package.json
$ cnpm install on-everything 
SYNC missed versions from official npm registry.

on-everything

Catch every event an EventEmitter publishes.

Use

$ npm install --save on-everything
var onEverything = require('on-everything');

Example

var onEverything = require('on-everything');
var request = require('request');

onEverything(request('http://yahoo.com'), function (eventName) {
  console.log(eventName);
});
$ node ./
request
socket
redirect
request
socket
response
complete
end

ee = onEverything(ee, onEvent);

ee

Type: EventEmitter

This is returned from the function to allow chaining.

onEvent(eventName, [...])

Type: Function

Called on every emitted event.

eventName

Name of the event emitted.

...

The original arguments passed to the event.

Related

Current Tags

  • 1.0.0                                ...           latest (11 years ago)

1 Versions

  • 1.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |