@szilanor/stream
    Preparing search index...

    Function shuffle

    • Returns a Stream that shuffles the items of the specified array.

      Type Parameters

      • T

        Type of items in the Stream.

      Parameters

      • array: T[]

        Array to shuffle.

      Returns Stream<T>

      Stream that yields the shuffled items of the specified array.

      const result = shuffle([1, 2, 3]);
      console.log([...result]); // [3, 1, 2]