1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 01:14:36 +00:00

fix: removed unnecessary check for www subdomain

This commit is contained in:
Yury Shkoda
2020-09-08 16:07:02 +03:00
parent 0eb9bc43ff
commit 3da5aba62a

View File

@@ -1,6 +1,6 @@
export const isUrl = (url: string): boolean => {
const pattern = new RegExp(
'^(http://www.|https://www.|http://|https://)[a-z0-9]+([-.]{1}[a-z0-9]+)*.[a-z]{2,5}(:[0-9]{1,5})?(/.*)?$',
'^(http://|https://)[a-z0-9]+([-.]{1}[a-z0-9]+)*.[a-z]{2,5}(:[0-9]{1,5})?(/.*)?$',
'gi'
)