Options
All
  • Public
  • Public/Protected
  • All
Menu

Module sortedUniq

Index

References

Functions Array

References

Renames and re-exports __type

Array Functions

  • sortedUniq<T>(array: T[]): T[]
  • This method is like uniq except that it only works for sorted arrays. If the input array is known to be sorted sortedUniq is faster than uniq.

    since

    5.12.0

    example
    sortedUniq([1, 1, 2])
    // => [1, 2]

    Type parameters

    • T

    Parameters

    • array: T[]

      The array to inspect.

    Returns T[]

    Returns the new duplicate free array.