🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

jerrypick

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jerrypick

Pluck and omit properties from a JS object

Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
517K
-33.11%
Maintainers
1
Weekly downloads
 
Created
Source

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 }

Keywords

object

FAQs

Package last updated on 07 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts