Basic usage

Given an object and a list of keys in the object, returns a new object with only the given keys.

import { pick } from 'radash'

const fish = {
  name: 'Bass',
  weight: 8,
  source: 'lake',
  barckish: false
}

pick(fish, ['name', 'source']) // => { name, source }

Testing

This _.pick function is 100% covered by tests. See them and contribute at GitHub.

Source

See the source for _.pick on GitHub.