6.1.0 • Published 8 years ago

@nod/console v6.1.0

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
8 years ago

@nod/console

A console that can outputs syntax highlighted JSON with circular reference support

It also supports outputting circular references.

Supports ES5, ES7, CommonJS, System, ES6 modules, and AMD. Works in node.js also should (not tested yet) work in browser.

GitHub tag Build status Dependency Status Join the chat

##Usage:

Installation:

npm install --save @nod/console

Examples:

import { Console, Configuration as ConsoleConfig } from '@nod/console';

let console = new Console(new ConsoleConfig());
let { error, warn, info, log, debug } = console;

log('Simple log');
error('DOH');
info('Too much info');
console.warn('This is a warning human !');

ES5 AMD

require('@nod/console', function(nodConsole) {
  var console = new nodConsole.Console();
  console.info('RequireJS is so 2013.');
});

ES5 CommonJS

var nodConsole = require('@nod/console');
var console = new nodConsole.Console();
console.info('ES5 is boring but it also works.');

Configuration

import { Console, Configuration } from '@nod/console';

let options = new Configuration({ // this will auto merge options
  enabled   : true, // disable and enable switch
  logTypes  : false, // log also variable types
  level     : 'debug', // debug < log < info < warn < error
});

let standart = {
  output : console.log.bind(console),
  error : console.error.bind(console)
};

let console = new Console(options, standart);

All methods have strict type checking please check source code.

Build and develop:

gulp

or

npm run default

Please check available gulp tasks with:

gulp -T

TODO:

  • Gulp tasks as another dependency
  • Maybe add stream support
  • Add inline docs

Contact:

Send e-mail Join the chat

forthebadge by NOD studios

6.1.0

8 years ago

6.0.0

8 years ago

5.2.3

8 years ago

5.2.2

8 years ago

5.2.1

8 years ago

4.0.5

9 years ago

4.0.4

9 years ago

4.0.3

9 years ago

4.0.2

9 years ago

4.0.1

9 years ago

4.0.0

9 years ago

3.0.7

9 years ago

3.0.6

9 years ago

3.0.5

9 years ago

3.0.4

9 years ago

3.0.3

9 years ago

3.0.2

9 years ago

3.0.1

9 years ago

3.0.0

9 years ago

2.0.0

9 years ago

1.2.5

9 years ago

1.2.4

9 years ago

1.2.3

9 years ago

1.2.2

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.0

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago