# obj-sanitize

> filltering inside the object and check the fields whether the value is present or not

Latest version **1.0.6** (published 2022-08-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install obj-sanitize
pnpm add obj-sanitize
yarn add obj-sanitize
bun add obj-sanitize
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2022-08-23 |
| First published | 2022-06-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Pravin/saran |
| Maintainers | pravinxavier |
| Keywords | npm-obj-sanitize, object-validator, array-of-object-sanitize |

## Links

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

## Dependencies (1)

- [nodemon](https://npm.io/package/nodemon.md) ^2.0.18

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2022-08-23
- 1.0.5 — 2022-08-23
- 1.0.4 — 2022-08-23
- 1.0.3 — 2022-08-23
- 1.0.2 — 2022-06-28
- 1.0.1 — 2022-06-24
- 1.0.0 — 2022-06-24

## README

obj-sanitize
=========

This NPM packet Manager is used to Sanitize data i.e Whether data in the the Key:value pair is Present or not. This package is useful in the backend whether data received as the key:value pair contains the all field if the key:value pair value is present the status will be shown as True. if key:value pair value is found missing it status will be shown as False.

## Installation

```bash
  npm i obj-sanitize --save
```

## Usage

`objValidate(arr)`

The usage of this module is very straightforward, as you can see in the example below.

```javascript
var objsanitize = require('obj-sanitize');

// var arr = [
//     { name:'saran1', age:'', contact:'125', address:'wewq', edu:'rew', role:'rew' },
//     { name:'saran2', age:'28', contact:'', address:'1212', edu:'rew', role:'rew' },
//     { name:'saran3', age:'28', contact:'454', address:'wqe', edu:'rew', role:'rew' },
//     { name:'saran4', age:'27', contact:'sd', address:'sd', edu:'rew', role:'rew' },
// ]

var output = fun.objValidate(arr)
console.log(output);
// {
//   status: false,
//   missFields: [ { row: 0, field: 'age' }, { row: 1, field: 'contact' } ]
// }

```

## License

ISC

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