diff options
author | Matthew Miller <matthew@millerti.me> | 2023-08-18 11:11:56 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2023-08-18 11:11:56 -0700 |
commit | dfb32f4891f6c955c25b2f305fa702cdaf8c5a5e (patch) | |
tree | 07c3c57caa54c77a08a209fd3cc509a359ed03e4 /packages/browser/src/helpers/isValidDomain.ts | |
parent | de5e22f5fec4eb980c77f00c586a1179565359d7 (diff) |
Format browser
Diffstat (limited to 'packages/browser/src/helpers/isValidDomain.ts')
-rw-r--r-- | packages/browser/src/helpers/isValidDomain.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/browser/src/helpers/isValidDomain.ts b/packages/browser/src/helpers/isValidDomain.ts index 4d2eedd..3e1ad10 100644 --- a/packages/browser/src/helpers/isValidDomain.ts +++ b/packages/browser/src/helpers/isValidDomain.ts @@ -9,6 +9,7 @@ export function isValidDomain(hostname: string): boolean { return ( // Consider localhost valid as well since it's okay wrt Secure Contexts - hostname === 'localhost' || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(hostname) + hostname === "localhost" || + /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(hostname) ); } |