counsell

21 console methods that run on all browsers and node

npm install counsell
1 downloads in the last day
1 downloads in the last week
5 downloads in the last month

counsell

browser support

Run tests
The tests are currently passing for all browsers.

Build Status

The following methods will be called if implemented, if they are not implemented or the console does not exist a "noop" will be called. It also deals with cross browser inconsistencies for console.profile. counsell.time is implemented to work in IE.

  • debug
  • error
  • info
  • log
  • warn
  • dir
  • dirxml
  • table
  • trace
  • assert
  • count
  • markTimeline
  • profile
  • profileEnd
  • time
  • timeEnd
  • timeStamp
  • group
  • groupCollapsed
  • groupEnd
  • clear

The counsell object will be added to the global in browser environments

counsell.log('a');
counsell.profile('a');
counsell.profileEnd('a');

That code can run on all environments including node (console.profile does not exist in node) and works with browserify.

If you don't like using counsell as a global just set console to the global counsell.

console = counsell;
//In IE
console.time('a') ...

If you like this tiny library please checkout Luc JS and give some positive or negative feedback.

[Craig Counsell

npm loves you