delete-keys
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

delete-keys

Build Status GH Status NPM

Remove the keys you don't want from an object

Install

$ npm install delete-keys

Using Github NPM Registry

$ npm install abranhe@delete-keys

Usage

import deleteKeys from 'delete-keys';
 
const obj = {
  name: 'abraham',
  last: 'hernandez',
  _id: '03773',
  phone: '800-000-0000',
};
 
deleteKeys(obj, ['_id', 'phone']);
// {
//   name: 'abraham',
//   last: 'hernandez',
// }

API

deleteKeys(object, [keys])

object

Type: object

The object you would like to delete the keys

keys

Type: array

License

MIT © Abraham Hernandez

Package Sidebar

Install

npm i delete-keys

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

3.64 kB

Total Files

5

Last publish

Collaborators

  • abranhe