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

1.1.1 • Public • Published

jerrypick

NPM package Build Size NPM Downloads

Pluck and omit properties from a JS object.

pluck(obj, [prop1, prop2, ...]); omit(obj, [prop1, prop2, ...]);

Quick start

import { pluck, omit } from 'jerrypick';

or using a script tag

<script src="//unpkg.com/jerrypick"></script>

Usage example

const myObj = {
  a: 3,
  b: 6,
  c: 9
};

pluck(myObj, ['a', 'c']);

// Result:
{ a: 3, c: 9 }

omit(myObj, ['a', 'b']);

// Result:
{ a: 3 }

Package Sidebar

Install

npm i jerrypick

Weekly Downloads

28,357

Version

1.1.1

License

MIT

Unpacked Size

16.1 kB

Total Files

8

Last publish

Collaborators

  • vasturiano