console-group
basic console.group implementation for node
Last updated 3 years ago by rich_harris .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install console-group 
SYNC missed versions from official npm registry.

node-console-group

In browsers, console.group() is an incredibly useful debugging tool:

function foo (input) {
  console.group('we are debugging', 'foo');
  console.log('input value:');
  console.log(input);
  console.group('nested group');
  console.log('console.groupception')
  console.groupEnd();
  console.groupEnd();

  return input.answer;
}

foo({answer: 42});

console-group-browser

But it doesn't exist in node.js! It was driving me crazy, so I created this package:

console-group-terminal

It's a 5 minute job - highly unsophisticated, doesn't even have a test suite, so YMMV. I'm not planning to actively maintain it (though I'll certainly take pull requests). Be warned! If that doesn't put you off, read on for usage instructions.

Installation and usage

Install...

npm install console-group

...and use. This overwrites the console.log method, and adds console.group and console.groupEnd.

require( 'console-group' ).install();

// later, if you want to clean up
require( 'console-group' ).teardown();

License

MIT.

Current Tags

  • 0.3.3                                ...           latest (3 years ago)

9 Versions

  • 0.3.3                                ...           3 years ago
  • 0.3.2                                ...           3 years ago
  • 0.3.1                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.1                                ...           3 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 22
Last Day 1
Last Week 10
Last Month 17
Dependencies (0)
None
Dev Dependencies (2)

Copyright 2014 - 2016 © taobao.org |