*Add normalizeDomain function

This commit is contained in:
Derrick Hammer 2022-08-18 14:31:52 -04:00
parent 8739ba1f30
commit 87a563c92d
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 0 deletions

View File

@ -51,3 +51,6 @@ export function resolveSuccess(records: DNSRecord[]): DNSResult {
records,
};
}
export function normalizeDomain(domain: string): string {
return domain.replace(/^\.+|\.+$/g, "").replace(/^\/+|\/+$/g, "");
}