# this-drop

> Return the `this` object stripped of some properties.

Latest version **1.0.1** (published 2015-09-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install this-drop
pnpm add this-drop
yarn add this-drop
bun add this-drop
```

## 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.1 |
| Published | 2015-09-16 |
| First published | 2015-09-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | © 2015 Studio B12 GmbH |
| Maintainers | tomekwi |
| Keywords | object, drop, omit, except, exclude, remove, delete, strip, immutable, key, keys, property, properties, this, trine, bind |

## Links

- npm: https://www.npmjs.com/package/this-drop
- Repository: https://github.com/studio-b12/this-drop
- Homepage: https://github.com/studio-b12/this-drop#readme
- Issues: https://github.com/studio-b12/this-drop/issues
- npm.io page: https://npm.io/package/this-drop

## Dependencies (2)

- [array-from](https://npm.io/package/array-from.md) ^2.0.2
- [array-includes](https://npm.io/package/array-includes.md) ^3.0.1

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-09-16
- 1.0.0 — 2015-09-16

## README

[![Coveralls – test coverage
](https://img.shields.io/coveralls/studio-b12/this-drop.svg?style=flat-square)
](https://coveralls.io/r/studio-b12/this-drop)
 [![Travis – build status
](https://img.shields.io/travis/studio-b12/this-drop/master.svg?style=flat-square)
](https://travis-ci.org/studio-b12/this-drop)
 [![David – status of dependencies
](https://img.shields.io/david/studio-b12/this-drop.svg?style=flat-square)
](https://david-dm.org/studio-b12/this-drop)
 [![Code style: airbnb
](https://img.shields.io/badge/code%20style-airbnb-777777.svg?style=flat-square)
](https://github.com/airbnb/javascript)




<a                                                             id="/"></a>&nbsp;

::drop()
========

**Return the `this` object stripped of some properties.**

<a                                                      id="/example"></a>&nbsp;

```js
const drop = require('this-drop');
const abc = {a: 1, b: 2, c: 3};

abc::drop(['a', 'c']);
//» {b: 2}
```




<a                                                 id="/installation"></a>&nbsp;

Installation
------------

```sh
$ npm install this-drop
```




<a                                                        id="/usage"></a>&nbsp;

Usage
-----

<pre>
object::drop(keys)
  ⇒ newObject
</pre>

See the [example above](#/example).

`keys` should be iterable – you’ll probably want to use an array here.

We don’t mutate the `object`. We make a shallow copy instead:

```js
const xyz = {x: 1, y: '2', z: [3]};
const xz = xyz::drop(['y']);

xyz.z === xz.z;
//» true
```

Note that the example uses the ES 2016 [function bind syntax](https://github.com/zenparsing/es-function-bind). You can still use the library in any JS engine down to ES5 though:

```js
drop.call(abc, ['a', 'c']);
//» {b: 2}
```




<a                                                      id="/license"></a>&nbsp;

License
-------

[MIT][] © [Studio B12 GmbH][]

[MIT]:              ./License.md
[Studio B12 GmbH]:  http://studio-b12.de

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