# depugger

> small debugging utility

Latest version **1.0.0** (published 2014-09-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install depugger
pnpm add depugger
yarn add depugger
bun add depugger
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2014-09-15 |
| First published | 2013-11-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Manuel Ernst |
| Maintainers | zaphod1984 |
| Keywords | debugging, debugger, debug |

## Links

- npm: https://www.npmjs.com/package/depugger
- Repository: https://github.com/zaphod1984/node-depugger
- Issues: https://github.com/zaphod1984/node-depugger/issues
- npm.io page: https://npm.io/package/depugger

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2014-09-15
- 0.2.4 — 2013-11-26
- 0.2.3 — 2013-11-26
- 0.2.2 — 2013-11-26
- 0.2.1 — 2013-11-26
- 0.2.0 — 2013-11-25
- 0.1.4 — 2013-11-23
- 0.1.3 — 2013-11-11
- 0.1.2 — 2013-11-07
- 0.1.1 — 2013-11-07
- 0.1.0 — 2013-11-07
- 0.0.3 — 2013-11-06
- 0.0.2 — 2013-11-06
- 0.0.0 — 2013-11-06

## README

# node-depugger [![Build Status](https://travis-ci.org/zaphod1984/node-depugger.png)](https://travis-ci.org/zaphod1984/node-depugger)

[![NPM](https://nodei.co/npm/depugger.png)](https://nodei.co/npm/depugger/)

[![NPM](https://nodei.co/npm-dl/depugger.png?months=3)](https://nodei.co/npm/depugger/)

Depugger is a small lib that provides a debugging utility.

## Installation

````bash
$ npm install depugger
````

## depugger([debug, [name]]), depugger(options)

`depugger` returns a function that supports all of the `util.format` features and outputs debug messages based on the initial configuration.

* `debug`: specifies if logged messages should be outputted, optional, default: false
* `name`: a category key that will prepend every message, optional, default: ""
* `options`: options hash that can be used to submit all of the above parameters at once

````javascript
var depugger = require('depugger');

var debug = depugger(true, 'fooDebugger');

debug('foo');
debug('bar "%s"', 'bax');
debug('spam %d eggs', 10);

//output to console:
//[fooDebugger] foo
//[fooDebugger] bar "bax"
//[fooDebugger] spam 10 eggs
````

Alternatively all parameters can be specified via an options hash:
````javascript
var depugger = require('depugger');

var debug = depugger({debug: true, name: 'fooDebugger'});

debug('foo');
debug('bar "%s"', 'bax');
debug('spam %d eggs', 10);

//output to console:
//[fooDebugger] foo
//[fooDebugger] bar "bax"
//[fooDebugger] spam 10 eggs

````

### depugger.child(childName)
Creates a child instance. The name of the parent's debugger will be concatenated with the childDebugger's name:
````javascript
var depugger = require('depugger');

var debug = depugger({debug: true, name: 'fooDebugger'});

var childDebug = debug.child('child');

childDebug('foo');

//output to console:
//[fooDebugger.child] foo

````

---
_Source: https://npm.io/package/depugger · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
