Detalhes do pacote

just-pick

angus-c141.7kMIT4.2.0

copy an object but with only the specified keys

object, pick, keys, no-dependencies

readme (leia-me)

just-pick

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

🍦 Try it

npm install just-pick
yarn add just-pick

Copy an object but with only the specified keys

import pick from 'just-pick';

var obj = { a: 3, b: 5, c: 9 };
pick(obj, ['a', 'c']); // {a: 3, c: 9}
pick(obj, 'a', 'c'); // {a: 3, c: 9}
pick(obj, ['a', 'b', 'd']); // {a: 3, b: 5}
pick(obj, ['a', 'a']); // {a: 3}

changelog (log de mudanças)

just-pick

4.2.0

Minor Changes

  • Rename node module .js -> .cjs

4.1.1

Patch Changes

  • fix: reorder exports to set default last #488

4.1.0

Minor Changes

  • package.json updates to fix #467 and #483