@newdash/newdash
Version:
javascript/typescript utility library
24 lines (23 loc) • 731 B
TypeScript
/**
* Creates an array of values corresponding to `paths` of `object`.
*
* @since 5.5.0
* @category Object
* @param object The object to iterate over.
* @param paths The property paths to pick.
* @returns Returns the picked values.
* @example
*
* ```js
* const object = { 'a': [{ 'b': { 'c': 3 } }, 4] }
*
* at(object, ['a[0].b.c', 'a[1]'])
* // => [3, 4]
* ```
*/
export declare function at(object: any, paths: number[]): any[];
export declare function at(object: any, paths: string[]): any[];
export declare function at(object: any, ...paths: number[]): any[];
export declare function at(object: any, ...paths: string[]): any[];
export declare function at(object: any, ...paths: any[]): any[];
export default at;