A typescript pick utility.
- returns an object with a subset of keys and values from a given object
- type safe.
- smallest possible size and lightest cpu load
npm i upick
import upick from 'upick'
Give μpick an object and the desired keys to pick.
const object = { a: 'a', b: 'b', c: 'c' }; const result = upick(object, ['a', 'c']); expect(result).toStrictEqual({ a: 'a', c: 'c' });