mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-28 04:47:42 +03:00
Array utils: unique items
This commit is contained in:
parent
2dae466162
commit
75defc2ae6
@ -28,3 +28,7 @@ export function chunk<T>(arr: T[], size: number) {
|
||||
arr.slice(i * size, i * size + size)
|
||||
);
|
||||
}
|
||||
|
||||
export function unique<T>(arr: T[]): T[] {
|
||||
return Array.from(new Set(arr));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user