UNPKG

rhodash

Version:

A deadly simple alternative to lodash

9 lines 512 B
import { ObjectOrClassInstance } from './types/object-or-class-instance'; /** * Create an object with only the properties that match the conditions. * * @example pickBy({ a: 1, b: null, c: undefined, d: 'foo' }) // => { a: 1, d: 'foo' } * @example pickBy({ a: 1, b: 2, c: 3, d: 4 }, (num) => num % 2 === 0) // => { b: 2, d: 4 } */ export declare function pickBy<T extends ObjectOrClassInstance, K extends keyof T>(obj: T, predicate?: (arg: T[K]) => boolean): Pick<T, K>; //# sourceMappingURL=pickBy.d.ts.map