Function count

  • Returns the number of valid number values (i.e., not null, NaN, or undefined) in the specified iterable; accepts an accessor.

    Parameters

    • iterable: Iterable<unknown>

      Input array.

    Returns number

  • Returns the number of valid number values (i.e., not null, NaN, or undefined) in the specified iterable; accepts an accessor.

    Type Parameters

    • TObject

    Parameters

    • iterable: Iterable<TObject>

      Input array.

    • accessor: ((a, b) => number)

      Accessor method.

        • (a, b): number
        • Parameters

          • a: TObject
          • b: TObject

          Returns number

    Returns number