@newdash/newdash
Version:
javascript/typescript utility library
21 lines (20 loc) • 571 B
TypeScript
/**
* Creates an object composed of the `object` properties `predicate` returns
* truthy for. The predicate is invoked with two arguments: (value, key).
*
* @since 5.7.0
* @category Object
* @param object The source object.
* @param predicate The function invoked per property.
* @returns Returns the new object.
* @example
*
* ```js
* const object = { 'a': 1, 'b': '2', 'c': 3 }
*
* pickBy(object, isNumber)
* // => { 'a': 1, 'c': 3 }
* ```
*/
export declare function pickBy(object: any, predicate: (value: any) => boolean): any;
export default pickBy;