# sanitize-object

> JS Object cleanup

Latest version **0.1.0** (published 2017-02-28) · MIT license · 0 weekly downloads

## Install

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

## 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.0 |
| Published | 2017-02-28 |
| First published | 2013-10-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.4.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Vitaly Domnikov |
| Maintainers | dotcypress |

## Links

- npm: https://www.npmjs.com/package/sanitize-object
- Repository: https://github.com/dotcypress/sanitize-object
- Homepage: https://github.com/dotcypress/sanitize-object#readme
- Issues: https://github.com/dotcypress/sanitize-object/issues
- npm.io page: https://npm.io/package/sanitize-object

## Recent versions

- 0.1.0 (latest) — 2017-02-28
- 0.0.1-security — 2016-03-23
- 2.0.0 — 2016-03-22
- 0.0.3 — 2014-02-26
- 0.0.2 — 2013-12-16
- 0.0.1 — 2013-10-20
- 0.0.0 — 2013-10-20

## README

# 💊 sanitize-object
[![NPM Version](https://img.shields.io/npm/v/sanitize-object.svg?style=flat-square)](https://www.npmjs.com/package/sanitize-object)
[![node](https://img.shields.io/node/v/sanitize-object.svg?style=flat-square)](https://www.npmjs.com/package/sanitize-object)
[![Build Status](https://img.shields.io/travis/dotcypress/sanitize-object.svg?branch=master&style=flat-square)](https://travis-ci.org/dotcypress/sanitize-object)

> Experimental JS Object cleanup

## Installation

```js
$ npm install sanitize-object
```

## Example
  
```js
const { exclude, only } = require('sanitize-object/exclude')

const sanitizeUser = exclude('password', 'id')
const result = sanitizeUser({id: 42, name: 'Rupert', password: 'qwerty'})
// result: { name: 'Rupert'}

const sanitizeUser = only('name')
const result = sanitizeUser({id: 42, name: 'Rupert', password: 'qwerty'})
// result: { name: 'Rupert'}

```

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