Migrate to a monorepo structure (#2909)
This commit is contained in:
7
packages/twenty-front/src/utils/is-domain.ts
Normal file
7
packages/twenty-front/src/utils/is-domain.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { isDefined } from './isDefined';
|
||||
|
||||
export const isDomain = (url: string | undefined | null) =>
|
||||
isDefined(url) &&
|
||||
/^((?!-))(xn--)?[a-z0-9][a-z0-9-_]{0,61}[a-z0-9]{0,1}\.(xn--)?([a-z0-9-]{1,61}|[a-z0-9-]{1,30}\.[a-z]{2,})$/.test(
|
||||
url,
|
||||
);
|
||||
Reference in New Issue
Block a user