• Creates a new iterable with all elements that pass the test implemented by the provided function. Similar to the Array.prototype.filter function. See the documentation of the above function for more details.

    Type Parameters

    • T

    Parameters

    • iterable: Iterable<T>

      Iterable on which to call the map function.

    • callbackFn: ((element, index) => boolean)

      Function that is called to test every element.

        • (element, index): boolean
        • Parameters

          • element: T
          • index: number

          Returns boolean

    • Optional thisArg: unknown

      Value to use as this when executing callbackFn.

    Returns Iterable<T>