JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 121856
  • Score
    100M100P100Q157518F
  • License MIT

Pluck and omit properties from a JS object

Package Exports

  • jerrypick
  • jerrypick/dist/jerrypick.common.js
  • jerrypick/dist/jerrypick.module.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jerrypick) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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

const { pluck, omit } = require('jerrypick');

or even

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