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.
uniq
sortedUniq
The array to inspect.
Returns the new duplicate free array.
4.0.0
sortedUniq([1, 1, 2])// => [1, 2] Copy
sortedUniq([1, 1, 2])// => [1, 2]
This method is like
uniqexcept that it only works for sorted arrays. If the input array is known to be sortedsortedUniqis faster thanuniq.