Skip to content

Commit e101e40

Browse files
Add unique helper
1 parent 011e83a commit e101e40

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

array/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import single from "./single.js";
3535
import sort from "./sort.js";
3636
import sum from "./sum.js";
3737
import transpose from "./transpose.js";
38+
import unique from "./unique.js";
3839
import zip from "./zip.js";
3940
import zipWith from "./zipWith.js";
4041

@@ -76,6 +77,7 @@ export {
7677
sort,
7778
sum,
7879
transpose,
80+
unique,
7981
zip,
8082
zipWith
8183
};
@@ -118,6 +120,7 @@ export default {
118120
sort,
119121
sum,
120122
transpose,
123+
unique,
121124
zip,
122125
zipWith
123126
};

array/unique.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default xs => [...new Set(xs)];

0 commit comments

Comments
 (0)