Package Exports
- @superhero/debug
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@superhero/debug) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Debug
Licence: MIT
A debug utility for pretty output..
Install
npm install @superhero/debug
...or just set the dependency in your package.json file:
{
"dependencies":
{
"@superhero/debug": "*"
}
}Example
const debug = require('@superhero/debug')(/* options */);
debug('debug:', {foo:'bar', baz:'qux'});Options
All options are optional.
{
// define a desired color of the output:
// [black, blue, cyan, green, magenta, red, yellow, white]
color: undefined,
// if false, output wont be colored.
colors: true,
// show timestamp in prefix.
date: true,
// if false, no output is made.
debug: true,
// depth of object inspection.
depth: 10,
// a prefixed keyword to define the output.
prefix: 'debug',
// what separator to be used between prefixes and content.
separator: ':\t'
}