# blacklist

> Returns a shallow copy of an object without blacklisted properties

Latest version **1.1.4** (published 2016-07-13) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2016-07-13 |
| First published | 2015-03-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/blacklist) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 32 |
| Author | Daniel Cousens |
| Maintainers | dcousens, jedwatson |
| Keywords | blacklist, filter, object, utility |

## Links

- npm: https://www.npmjs.com/package/blacklist
- Repository: https://github.com/dcousens/blacklist
- Issues: https://github.com/dcousens/blacklist/issues
- npm.io page: https://npm.io/package/blacklist

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.1.4 (latest) — 2016-07-13
- 1.1.2 — 2015-04-08
- 1.1.1 — 2015-04-01
- 1.1.0 — 2015-03-27
- 1.0.1 — 2015-03-27
- 1.0.0 — 2015-03-27

## README

# blacklist

[![Build Status](https://travis-ci.org/dcousens/blacklist.png?branch=master)](https://travis-ci.org/dcousens/blacklist)
[![Version](http://img.shields.io/npm/v/blacklist.svg)](https://www.npmjs.org/package/blacklist)

This module shallow copies an object, ignoring keys depending on the filter object passed to it.

Filters can be provided as an object (truthy keys are blacklisted) or string arguments.

### ES next alternative

If you can, use 

``` javascript
var { a, ... bc } = { a: 1, b: 2, c: 3 }
```


### Example
``` javascript
var someInput = { a: 1, b: 2, c: 3 }

// ...

var blacklist = require('blacklist')

blacklist(someInput, 'b', 'c')
// => { a: 1 }

blacklist(someInput, {
	a: true,   // a will not be in the result
	b: false,  // b will be in the result
	c: 1 > 2   // false, therefore c will be in the result
})
// => { b: 2, c: 3 }
```

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