<commit_before># clean-deep

Removes empty _objects_, empty _strings_, _null_ and _undefined_ values from objects. Does not alter the original object.

## Status

  [![npm version][npm-image]][npm-url]
  [![npm downloads][downloads-image]][downloads-url]
  [![build status][travis-image]][travis-url]

## Installation

  Install the package via `npm`:

```
$ npm install clean-deep
```

## Usage

#### Arguments

  1. `object` *(Object)*: The source object.
  2. `[options]` *(Object)*: An optional object with the following options:

| Option            | Description | Default value                       |
|-------------------|-------------|-------------------------------------|
| _emptyObjects_    | _true_      | Remove empty objects, ie: `{}`      |
| _emptyStrings_    | _true_      | Remove empty strings, ie: `''`      |
| _nullValues_      | _true_      | Remove null values, ie: `null`      |
| _undefinedValues_ | _true_      | Remove null values, ie: `undefined` |

#### Returns

  *(Object)*: Returns the cleansed object.

#### Example

```js
var defaultsDeep = require('clean-deep');

var object = { foo: '', bar: {}, biz: 'baz', qux: { baz: 'boz', txi: '' } };

defaultsDeep(object);
// => { biz: 'baz', qux: { baz: 'boz' } }
```

## Tests

```js
$ npm test
```

## License

MIT

[downloads-image]: https://img.shields.io/npm/dm/clean-deep.svg<commit_msg>Fix typo in README<commit_after># clean-deep

Removes empty _objects_, empty _strings_, _null_ and _undefined_ values from objects. Does not alter the original object.

## Status

  [![npm version][npm-image]][npm-url]
  [![npm downloads][downloads-image]][downloads-url]
  [![build status][travis-image]][travis-url]

## Installation

  Install the package via `npm`:

```
$ npm install clean-deep
```

## Usage

#### Arguments

  1. `object` *(Object)*: The source object.
  2. `[options]` *(Object)*: An optional object with the following options:

| Option            | Default value | Description                         |
|-------------------|---------------|-------------------------------------|
| _emptyObjects_    | _true_        | Remove empty objects, ie: `{}`      |
| _emptyStrings_    | _true_        | Remove empty strings, ie: `''`      |
| _nullValues_      | _true_        | Remove null values, ie: `null`      |
| _undefinedValues_ | _true_        | Remove null values, ie: `undefined` |

#### Returns

  *(Object)*: Returns the cleansed object.

#### Example

```js
var cleanDeep = require('clean-deep');

var object = { foo: '', bar: {}, biz: 'baz', qux: { baz: 'boz', txi: '' } };

cleanDeep(object);
// => { biz: 'baz', qux: { baz: 'boz' } }
```

## Tests

```js
$ npm test
```

## License

MIT

[downloads-image]: https://img.shields.io/npm/dm/clean-deep.svg
{'fraction_non_alphanumeric': 0.21343012704174227, 'fraction_numerical': 0.0014519056261343012, 'mean_word_length': 2.5607235142118863, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1905994', 'n_tokens_mistral': 922, 'n_tokens_neox': 867, 'n_words': 238}