UNPKG

@orbit/utils

Version:

Core utilities for Orbit.

20 lines (19 loc) 925 B
/** * Like the Lodash _.every function, this function takes an array and a * predicate function and returns true or false depending on whether the * predicate is true for every item in the array. */ export declare function every(array: any[], predicate: (member: any, index: number) => boolean): boolean; /** * Like the Lodash _.some function, this function takes an array and a predicate * function and returns true or false depending on whether the predicate is true * for any of the items in the array. */ export declare function some(array: any[], predicate: (member: any, index: number) => boolean): boolean; /** * This function is similar to Array.prototype.find, but it returns the result * of calling the value function rather than an item of the array. * * @deprecated since v0.17, remove in v0.18 */ export declare function firstResult(array: any[], valueFn: (member: any, index: number) => any): any;