ts-iterable-functions
    Preparing search index...

    Function exceptConst

    • Yields elements from the source iterable that do not appear in the exclusion sequence.

      Curried version of _except.

      Type Parameters

      • T

        Element type produced by the source iterable.

      Parameters

      • seq: Iterable<T>

        Iterable whose elements are removed from the result if encountered.

      • setFactory: SetFactory<T> = ...

        Optional factory supplying the set used to track excluded values.

      Returns (src: Iterable) => Iterable

      A deferred iterable containing items from src that are absent in seq.

      Error Rethrows any error thrown by setFactory.

      const remaining = [..._except([1, 2, 3], [2])];
      console.log(remaining); // [1, 3]

      or using the curried version:

      const remaining = [...pipeInto([1, 2, 3], except([2]))];
      console.log(remaining); // [1, 3]