parent
6a1fa7e67f
commit
a189626e8b
3 changed files with 16 additions and 5 deletions
|
|
@ -319,9 +319,11 @@ export function uniqsort(a) {
|
|||
|
||||
// rational version
|
||||
export function uniqsortr(a) {
|
||||
return a.sort().filter(function (item, pos, ary) {
|
||||
return !pos || item.ne(ary[pos - 1]);
|
||||
});
|
||||
return a
|
||||
.sort((x, y) => x.compare(y))
|
||||
.filter(function (item, pos, ary) {
|
||||
return !pos || item.ne(ary[pos - 1]);
|
||||
});
|
||||
}
|
||||
|
||||
// code hashing helpers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue