mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2026-08-31 19:03:45 +02:00
Replace lists by sets in the apply action cache
This commit is contained in:
@@ -20,3 +20,11 @@ import { uniq } from 'lodash'
|
||||
export function hasDuplicates (list: Array<string>): boolean {
|
||||
return uniq(list).length !== list.length
|
||||
}
|
||||
|
||||
export function setToList<T> (set: Set<T>): Array<T> {
|
||||
const result: Array<T> = []
|
||||
|
||||
set.forEach((item) => result.push(item))
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user