Chore: improve phishing hosts

This commit is contained in:
SukkaW
2024-11-10 17:58:44 +08:00
parent 6811b23acd
commit 19228a8216
3 changed files with 59 additions and 43 deletions

View File

@@ -66,7 +66,7 @@ export function domainWildCardToRegex(domain: string) {
return result;
}
export const identity = <T>(x: T): T => x;
export const identity = <T, R = T>(x: T): R => x as any;
export function appendArrayFromSet<T>(dest: T[], source: Set<T> | Array<Set<T>>, transformer: (item: T) => T = identity) {
const casted = Array.isArray(source) ? source : [source];