🎨 Unified code style

This commit is contained in:
Tw93
2023-06-24 20:17:52 +08:00
parent 07938f02f4
commit 00c01a9638
23 changed files with 107 additions and 117 deletions

3
bin/utils/url.ts vendored
View File

@@ -9,7 +9,7 @@ export function getDomain(inputUrl: string): string | null {
const parsed = psl.parse(url.hostname);
// If domain is available, split it and return the SLD.
if ("domain" in parsed && parsed.domain) {
if ('domain' in parsed && parsed.domain) {
return parsed.domain.split('.')[0];
} else {
return null;
@@ -19,7 +19,6 @@ export function getDomain(inputUrl: string): string | null {
}
}
// Appends 'https://' protocol to the URL if not present.
export function appendProtocol(inputUrl: string): string {
try {