console-emitter
v0.0.1
Published
A `console` compatible interface which emits events on console method calls
Readme
Console Emitter
Implementation of the console API which emits appropriate events on all method calls.
Usage
The Console class is implements the same interface as the NodeJS console API. Each console method is emitted as an event with the same name.
var Console = require('console-emitter');
var console = new Console();
console.on('log', logme);
console.log('1', '2', '3');
function logme(one, two, three) {
global.console.log(' one:', one);
global.console.log(' two:', two);
global.console.log(' three:', three);
}
// Prints
// one: 1
// two: 2
// three: 3
