summaryrefslogtreecommitdiffhomepage
path: root/packages/browser/src/helpers/isValidDomain.ts
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2023-08-18 13:59:11 -0700
committerMatthew Miller <matthew@millerti.me>2023-08-18 13:59:11 -0700
commita59634a1a9b0393622fb121fbe229132c01a2624 (patch)
treecb4eb3fdf778dfc88d6d389b609b1cef6ebb4b4d /packages/browser/src/helpers/isValidDomain.ts
parente0d32bd2a3a60b4b2fd96a2874eae3ad976483df (diff)
Use single-quotes and increase line width
Diffstat (limited to 'packages/browser/src/helpers/isValidDomain.ts')
-rw-r--r--packages/browser/src/helpers/isValidDomain.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/browser/src/helpers/isValidDomain.ts b/packages/browser/src/helpers/isValidDomain.ts
index 3e1ad10..22f045f 100644
--- a/packages/browser/src/helpers/isValidDomain.ts
+++ b/packages/browser/src/helpers/isValidDomain.ts
@@ -9,7 +9,7 @@
export function isValidDomain(hostname: string): boolean {
return (
// Consider localhost valid as well since it's okay wrt Secure Contexts
- hostname === "localhost" ||
+ hostname === 'localhost' ||
/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(hostname)
);
}