1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-02 15:36:06 +02:00
This commit is contained in:
Aya Morisawa
2018-11-09 11:01:55 +09:00
committed by syuilo
parent 21d9afebc3
commit a9436306ab
2 changed files with 8 additions and 10 deletions

View File

@@ -18,6 +18,10 @@ export function erase<T>(x: T, xs: T[]): T[] {
return xs.filter(y => x !== y);
}
export function setDifference<T>(xs: T[], ys: T[]): T[] {
return xs.filter(x => !ys.includes(x));
}
export function unique<T>(xs: T[]): T[] {
return [...new Set(xs)];
}