• Creates a push iterable with the values of elements of the source iterable.

    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 mapIt / filterIt combination.

    Type Parameters

    • T

      A type of source elements.

    • TValue = T

      A type of source element values.

    Parameters

    • source: Iterable<T>

      A source iterable.

    • 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 the element values.

Generated using TypeDoc