|
Last change
on this file since a762898 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
487 bytes
|
| Line | |
|---|
| 1 | import { uniqBy as uniqBy$1 } from '../../array/uniqBy.mjs';
|
|---|
| 2 | import { ary } from '../../function/ary.mjs';
|
|---|
| 3 | import { identity } from '../../function/identity.mjs';
|
|---|
| 4 | import { isArrayLikeObject } from '../predicate/isArrayLikeObject.mjs';
|
|---|
| 5 | import { iteratee } from '../util/iteratee.mjs';
|
|---|
| 6 |
|
|---|
| 7 | function uniqBy(array, iteratee$1 = identity) {
|
|---|
| 8 | if (!isArrayLikeObject(array)) {
|
|---|
| 9 | return [];
|
|---|
| 10 | }
|
|---|
| 11 | return uniqBy$1(Array.from(array), ary(iteratee(iteratee$1), 1));
|
|---|
| 12 | }
|
|---|
| 13 |
|
|---|
| 14 | export { uniqBy };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.