1.1.1 • Published 2 years ago

jerrypick v1.1.1

Weekly downloads
5,297
License
MIT
Repository
github
Last release
2 years ago

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 }
1.1.1

2 years ago

1.1.0

2 years ago

1.0.5

3 years ago

1.0.4

4 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

6 years ago