• Creates a push iterable with the values of elements of the given array.

    Element value is the result of provided function call, except false, null, and undefined which are filtered out.

    This can be used as a more effective mapArray / filterIt combination.

    Type Parameters

    • T

      A type of array elements.

    • TValue = T

      A type of array element values.

    Parameters

    • array: ArrayLike<T>

      A source array.

    • valueOf: ((this, element) => undefined | null | false | TValue)

      A function that values elements, taking the source element as the only parameter, and returning either its value, or false/null/undefined to filter it out.

        • (this, element): undefined | null | false | TValue
        • Parameters

          • this: void
          • element: T

          Returns undefined | null | false | TValue

    Returns PushIterable<TValue>

    New push iterable with array element values.

Generated using TypeDoc