mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore: custom impl for set.difference api (#19135)
This commit is contained in:
parent
0322a8b1d9
commit
144cc8ab6d
4 changed files with 16 additions and 5 deletions
|
|
@ -216,3 +216,13 @@ export const plainDateTimeCompare = (ascending: boolean, a: TimelinePlainDateTim
|
|||
}
|
||||
return aDateTime.millisecond - bDateTime.millisecond;
|
||||
};
|
||||
|
||||
export function setDifference<T>(setA: Set<T>, setB: Set<T>): Set<T> {
|
||||
const result = new Set<T>();
|
||||
for (const value of setA) {
|
||||
if (!setB.has(value)) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue