# delete-null

> this package will delete null or empty objects from an object

Latest version **0.1.4** (published 2020-12-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install delete-null
pnpm add delete-null
yarn add delete-null
bun add delete-null
```

## 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.1.4 |
| Published | 2020-12-21 |
| First published | 2020-11-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ribhu Ratnam |
| Maintainers | ribhu_ji |
| Keywords | delete, null, object, recursive, recursively, empty, delete-null, clean, undefined, remove, cleaner, remover |

## Links

- npm: https://www.npmjs.com/package/delete-null
- npm.io page: https://npm.io/package/delete-null

## Recent versions

- 0.1.4 (latest) — 2020-12-21
- 0.1.3 — 2020-12-21
- 0.1.2 — 2020-11-04
- 0.1.1 — 2020-11-04
- 0.1.0 — 2020-11-04

## README

# delete-null

  Cleaning Objects was never more easy.

```js
const deleteNull = require('delete-null');

var obj = {
  name: "ribhu",
  surname: "ratnam",
  age: 20,
  bio: {},
  friends: {
    first : undefined,
    second : null
  },
  books: {
    first: "Harry Potter",
    second: {},
    third: null,
    fourth : undefined
  }
}

obj = deleteNull(obj);
  /*
  obj = {
    name: "ribhu",
    surname: "ratnam",
    age: 20,
    books: {
      first: "Harry Potter"
    }
  }
  */
```

## Installation

This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/).

Before installing, [download and install Node.js](https://nodejs.org/en/download/).
Node.js 0.10 or higher is required.

If this is a brand new project, make sure to create a `package.json` first with
the [`npm init` command](https://docs.npmjs.com/creating-a-package-json-file).

Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):

```bash
$ npm install delete-null
```

## Features

  * Handles null
  * Handles empty objects
  * Handles undefined values
  * Fast & recursive


## Philosophy

  
  While dealing with objects, we often have to write code to handle null or empty objects or undefined values. This package will handle all that, giving you an Object that doesn't contain unwanted values.


## People

Author of delete-null is [Ribhu Ratnam](https://github.com/ribhuji).

Visit [Ribhu's website](https://ribhuji.github.io/ribhu/) for contact.

## License

  [MIT](LICENSE)

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