initial tags api

This commit is contained in:
tmshv committed 2020-02-23 03:12:06 +03:00
1 parent 11d628fd50
commit ec2609e900
6 files changed
+156 -9

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
export function unique<T>(items: T[], key: (item: T) => string): T[]{
const map = new Map(items.map(x => [key(x), x]))
return [...map.values()]
}