# sterilize

> JS Object cleanup

Latest version **0.0.2** (published 2017-02-26) · MIT license · 0 weekly downloads

## Install

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

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

## Links

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

## Recent versions

- 0.0.2 (latest) — 2017-02-26
- 0.0.1 — 2017-02-26

## README

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

> JS Object cleanup

## Installation

```js
$ npm install sterilize
```

## Example
  
```js
const exclude = require('sterilize/exclude')
const sanitizeUser = exclude('password', 'id')
const result = sanitizeUser({id: 42, name: 'Rupert', password: 'qwerty'})

// result: { name: 'Rupert'}

```

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

// result: { name: 'Rupert'}
```

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