@kldzj/debug
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @kldzj/debug

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

7.7 kB

Total Files

7

Last publish

Collaborators

  • kldzj