UNPKG

rhodash

Version:

A deadly simple alternative to lodash

7 lines 272 B
/** * Count the number of elements that match a given condition. * * @example countBy([1, 2, 3, 4, 5], (x) => x % 2 === 0) // => 2 */ export declare function countBy<T>(array: readonly T[], predicate: (arg: T) => boolean): number; //# sourceMappingURL=countBy.d.ts.map