feat: let's goooo
This commit is contained in:
+3
-2
@@ -2,6 +2,7 @@ import { getTLDList } from "./tld";
|
||||
import englishWords from "@/data/english.txt?raw";
|
||||
import frenchWords from "@/data/french.txt?raw";
|
||||
import { randomElement, shuffled } from "./random";
|
||||
import type { WhoIs } from "./whois";
|
||||
|
||||
export class DomainFactory {
|
||||
tldList: string[] = [];
|
||||
@@ -9,9 +10,9 @@ export class DomainFactory {
|
||||
words: Record<string, string[]> = {};
|
||||
generated: string[] = [];
|
||||
|
||||
async init() {
|
||||
async init(whois: WhoIs) {
|
||||
try {
|
||||
this.tldList = await getTLDList();
|
||||
this.tldList = await getTLDList(whois);
|
||||
} catch (e) {
|
||||
this.error = "Could not load TLD list";
|
||||
throw e;
|
||||
|
||||
Reference in New Issue
Block a user