Chore: extract constants from build script

This commit is contained in:
SukkaW
2022-11-07 17:54:26 +08:00
parent 43b1315872
commit 6832dafecc
6 changed files with 231 additions and 210 deletions

View File

@@ -0,0 +1,3 @@
const rDomain = /^(((?!\-))(xn\-\-)?[a-z0-9\-_]{0,61}[a-z0-9]{1,1}\.)*(xn\-\-)?([a-z0-9\-]{1,61}|[a-z0-9\-]{1,30})\.[a-z]{2,}$/m;
module.exports.isDomainLoose = (domain) => rDomain.test(domain);