0.0.1 • Published 10 years ago

console-emitter v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

Console Emitter

Implementation of the console API which emits appropriate events on all method calls.

NPM Module

Build Status Coverage Status

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