@eroyeroy/utils - v0.1.0
    Preparing search index...

    Function uniqueArray

    • Returns a new array with duplicate values removed, preserving insertion order.

      Type Parameters

      • T

      Parameters

      • array: readonly T[]

        The source array.

      Returns T[]

      uniqueArray([1, 2, 1, 3, 2]) // => [1, 2, 3]
      uniqueArray(["a", "b", "a"]) // => ["a", "b"]