@kldzj/debug
v1.0.0
Published
A simple debugger.
Downloads
2
Readme
Just another simple JavaScript debugger.
Installation
Using yarn:
$ yarn add @kldzj/debug
Using npm:
$ npm i -S @kldzj/debug
Example usage
// demo.js
import { createDebugger } from "@kldzj/debug";
const debug = createDebugger("test");
debug.debug("Hello World");
// you can enable/disable the debugger during runtime:
debug.disable();
debug.enable();
// you can also create child debuggers:
const child = debug.createChild("comp");
child.debug("Hello World");
// would log: [test:comp] Hello World
// ...
// if you don't want to handle the `Debugger` class instance
// you can create a simple function interface right away:
const debug = createDebugger("test").createFunction();
debug("Hello World");
# In your terminal:
$ DEBUG=test:* node demo.js