# dropkey

> From each object in an array, delete keys specified

Latest version **1.0.0** (published 2015-11-27) · MIT license · 0 weekly downloads

## Install

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

## 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.0 |
| Published | 2015-11-27 |
| First published | 2015-11-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Dan VerWeire |
| Maintainers | wankdanker |
| Keywords | delete, key, object, array, for, each |

## Links

- npm: https://www.npmjs.com/package/dropkey
- Repository: https://github.com/wankdanker/node-dropkey
- Homepage: https://github.com/wankdanker/node-dropkey#readme
- Issues: https://github.com/wankdanker/node-dropkey/issues
- npm.io page: https://npm.io/package/dropkey

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-11-27

## README

dropkey
-------

From each object in an array, delete keys specified

example
-------

```js
var dk = require('dropkey');
var a = [{ item_id : 1, name : 'test1' }, { item_id : 2, name : 'test2' }]

dk(a, ['item_id']);

console.log(a);

//[{ name : 'test1' }, { name : 'test2' }]
```

api
---

### dropkey(objectArray, keyArray)

* objectArray: [Array] - an array containing objects to process
* keyArray: [Array] - an array of strings containing the keys to delete from the objects in objectArray

additional info
---------------

There's nothing magical about this. This is just a module for this small snippet of code:

```js
function dropkeys (array, dropable) {
        array.forEach(function (item) {
                dropable.forEach(function (key) {
                        delete item[key];
                });
        });
        return array;
}
```

license
-------

MIT

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