on-everything
v1.0.0
Published
Catch every event an EventEmitter publishes
Downloads
6
Maintainers
Readme
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.