on-everything

Catch every event an EventEmitter publishes

MIT 1 个版本
安装
npm install on-everything
yarn add on-everything
pnpm add on-everything
bun add on-everything
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.

版本列表
1.0.0 2015-07-12