Function count

  • Returns a promise that represents how many elements in the specified iterable sequence satisfy a condition otherwise, the number of items in the sequence.

    Type Parameters

    • T

      The type of elements in the source collection.

    Parameters

    • source: Iterable<T>

      An iterable sequence that contains elements to be counted.

    • Optional options: OptionalFindOptions<T>

      The options for a predicate for filtering and thisArg for binding.

    Returns number

    The number of matching elements for the given condition if provided, otherwise the number of elements in the sequence.

Generated using TypeDoc