# redull

> JavaScript module for null check on JSON object

Latest version **0.0.4** (published 2019-05-31) · MIT license · 0 weekly downloads

## Install

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

## 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.0.4 |
| Published | 2019-05-31 |
| First published | 2019-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | sureshkumar.on |
| Maintainers | sureshkumar.on |
| Keywords | null-check, check, json, object, null, find-null, find-value, null check, null checker, null-checker, null-check-optimizer, null-check-optimizer1, null check optimizer |

## Links

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

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.0.4 (latest) — 2019-05-31
- 0.0.3 — 2019-04-08
- 0.0.2 — 2019-04-03
- 0.0.1 — 2019-03-29

## README

# redull

redull library exported as a node.js module

## Installation

```bash
npm install redull
```

## Usage
```
const foo = (response !=null && response.data !=null && response.data.item !=null && response.data.item.id != null) ? response.data.item.id : ''
```
Instead of above condition, you can use below
### Scenario 1:
This will return the actual value
```python
import redull from 'redull'

const response = {
    data:{
        item: {
            id: "F56Gh"
        }
    }
}

const foo = redull.getVal(response,"data.item.id");
// result will be `F56Gh`

```
### Scenario 2:
This will return `undefined` instead of breaking the code.
```python
import redull from 'redull'

const response = {
    data:{
        item: {
            id: "F56Gh"
        }
    }
}

const foo = redull.getVal(response,"data.item.name");
// result will be `undefined`

```

## License
[MIT](https://choosealicense.com/licenses/mit/)

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