UNPKG

sequency

Version:

Functional sequences for processing iterable data in JavaScript

12 lines (11 loc) 383 B
import Sequence from "./Sequence"; export declare class Count { /** * Returns the number of elements of this sequence. If `predicate` is present, returns * the number of elements matching the given `predicate`. * * @param {(T) => boolean} predicate * @returns {number} */ count<T>(this: Sequence<T>, predicate?: (item: T) => boolean): number; }