@szilanor/stream
    Preparing search index...

    Function toSet

    • Returns a collector that returns the source as a set.

      Type Parameters

      • T

        Type of items in the source.

      Returns CollectorFunction<T, Set<T>>

      Collector that returns the source as a set.

      const result = toSet<number>()([1, 2, 3]);
      console.log(result); // Set { 1, 2, 3 }