4.17.11
3.10.1
2.4.2
1.3.1

_.sortedUniq(array)

This method is like _.uniq except that it's designed and optimized for sorted arrays.

Since

4.0.0

Arguments

argument
array
type
Array
description
The array to inspect.

Returns

(array)

Example

_.sortedUniq([1, 1, 2]);
// => [1, 2]
_.sortedUniq([1, 1, 2]);
// => [1, 2]