console-emitter

0.0.1 • Public • Published

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

Package Sidebar

Install

npm i console-emitter

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • josiah