<commit_before># express-error

[![Build status](https://img.shields.io/wercker/ci/55cdda23602392657103dfac.svg "Build status")](https://app.wercker.com/project/bykey/d2d38dc4f464d2afd95c382ff4662912)
[![NPM downloads](https://img.shields.io/npm/dm/@turistforenignen/express-error.svg "NPM downloads")](https://www.npmjs.com/package/@turistforenignen/express-error)
[![NPM version](https://img.shields.io/npm/v/@turistforenignen/express-error.svg "NPM version")](https://www.npmjs.com/package/@turistforenignen/express-error)
[![Node version](https://img.shields.io/node/v/@turistforenignen/express-error.svg "Node version")](https://www.npmjs.com/package/@turistforenignen/express-error)
[![Dependency status](https://img.shields.io/david/turistforeningen/express-error.svg "Dependency status")](https://david-dm.org/turistforeningen/express-error)

Return JSON error objects from your Express backed API.

## Requiremets

* Node.JS v4.0.0 or newer
* io.js v1.0.0 or newer

## Install

```
npm install @turistforenignen/express-error --save
```

## Usage

This should be put at the end of your Express route configurations. See the
[examples](https://github.com/Turistforeningen/express-error/tree/master/examples)
directory for more detailed examples.

```js
app.use(require('@turistforenigen/express-error'));
```
<commit_msg>Fix broken npm badges in README<commit_after># express-error

[![Build status](https://img.shields.io/wercker/ci/55cdda23602392657103dfac.svg "Build status")](https://app.wercker.com/project/bykey/<KEY>)
[![NPM downloads](https://img.shields.io/npm/dm/@turistforeningen/express-error.svg "NPM downloads")](https://www.npmjs.com/package/@turistforeningen/express-error)
[![NPM version](https://img.shields.io/npm/v/@turistforeningen/express-error.svg "NPM version")](https://www.npmjs.com/package/@turistforeningen/express-error)
[![Node version](https://img.shields.io/node/v/@turistforeningen/express-error.svg "Node version")](https://www.npmjs.com/package/@turistforeningen/express-error)
[![Dependency status](https://img.shields.io/david/turistforeningen/express-error.svg "Dependency status")](https://david-dm.org/turistforeningen/express-error)

Return JSON error objects from your Express backed API.

## Requiremets

* Node.JS v4.0.0 or newer
* io.js v1.0.0 or newer

## Install

```
npm install @turistforeningen/express-error --save
```

## Usage

This should be put at the end of your Express route configurations. See the
[examples](https://github.com/Turistforeningen/express-error/tree/master/examples)
directory for more detailed examples.

```js
app.use(require('@turistforenigen/express-error'));
```

{'fraction_non_alphanumeric': 0.16685541713854285, 'fraction_numerical': 0.024160060400151, 'mean_word_length': 5.658291457286432, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 22, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '30760', 'n_tokens_mistral': 1006, 'n_tokens_neox': 894, 'n_words': 141}