sorted-uniq-by

v4.17.15arrow_drop_down
v4.17.15
v4.17.11
STATUS
Passing
DOWNLOADS
164
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
4 years ago
SIZE
N/A
This method is like `_.uniqBy` except that it's designed and optimized for sorted arrays.
2 contributors
Install sorted-uniq-by as a package?
Copied
npm i @bit/lodash.lodash.sorted-uniq-by
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
sortedUniqBy (
array:Array,
iteratee:Function
) : Array

This method is like uniqBy except that it’s designed and optimized for sorted arrays.

Example
sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor)
// => [1.1, 2.3]
Arguments
array: Array

The array to inspect.

iteratee: Function

The iteratee invoked per element.

Returns
Array

Returns the new duplicate free array.

Help and resources