• Transform an iterator by applying a map and/or filter function to each item in the iterator. The map and filter functions are applied in the order they are specified

    Type Parameters

    • T

    • K = T

    Parameters

    • itr: Iterable<T>

      Iterator to transform

    • transformer: {
          filter?(item, index) => any;
          map?(item, index) => K;
      }

      Transformer object containing the filter and/or map functions

    Returns Iterable<K>

    Transformed iterator