# debug.me

> 1. install via npm:

Latest version **0.3.2** (published 2016-07-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install debug.me
pnpm add debug.me
yarn add debug.me
bun add debug.me
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.2 |
| Published | 2016-07-04 |
| First published | 2013-10-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Anatoliy Chakkaev |
| Maintainers | anatoliy |

## Links

- npm: https://www.npmjs.com/package/debug.me
- npm.io page: https://npm.io/package/debug.me

## Dependencies (1)

- [request](https://npm.io/package/request.md) >= 0

## Recent versions

- 0.3.2 (latest) — 2016-07-04
- 0.3.1 — 2016-06-16
- 0.2.1 — 2016-04-15
- 0.2.0 — 2016-04-11
- 0.1.0 — 2014-09-01
- 0.0.7 — 2014-01-24
- 0.0.6 — 2013-11-07
- 0.0.5 — 2013-11-04
- 0.0.4 — 2013-10-27
- 0.0.3 — 2013-10-27
- 0.0.2 — 2013-10-26
- 0.0.1 — 2013-10-25

## README

## Installation

1. install via npm:

    npm install debug.me --save

2. put to config/autoload.js (compoundjs only);

    require('debug.me');

## Usage

```
var debugme = require('debug.me');

// global error hanler
debugme.registerGlobalHandler([customHandler]);
// customHandler - optional function param which called with error,
// if customHandler is not specified process will exist,
// when customHandler is specified, then it is a responsibility of
// customHandler to exit process (see example)
// customHandler called after reporting about error

// custom error reporter
var reportError = debugme.errorReporter();
reportError(new Error('Message'), function() {
    console.log('error reported');
});

// error reporter middleware for express/compound
app.use(debugme.middleware([customHandler]));
// customHandler - optional function param which called with `error` and `next`
// if customHandler is not specified next will be called inside handler
// when customHandler is specified, then it is a responsibility of
// customHandler to call `next` with error passed to it as first arguments (see example)
// customHandler called after reporting about error
```

## Config (compound apps)

```
app.enable('send-errors');
app.enable('skip-global-errors');

// optionally customHandler can be specified for uncaught errors
compound.onUncaughtError = function(err) {
    compound.log(err);
    process.exit(1);
};
// and for uncaught error
compound.onCaughtError = function(err, next) {
    compound.log(err);
    next(err);
};
```

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