new build

This commit is contained in:
Mohit Panjwani
2021-12-03 21:13:44 +05:30
parent aba0a340a4
commit 8a7ea53ffb
76 changed files with 251 additions and 243 deletions

View File

@ -59,9 +59,9 @@ export default {
.replace(/(\d{3})(?=\d)/g, '$1' + thousand_separator)
let precisionText = precision
? decimal_separator +
Math.abs(amount - i)
.toFixed(precision)
.slice(2)
Math.abs(amount - i)
.toFixed(precision)
.slice(2)
: ''
let combinedAmountText =
negativeSign + thousandText + amountText + precisionText
@ -95,11 +95,11 @@ export default {
}
let pattern = new RegExp(
'^(https?:\\/\\/)?' + // protocol
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
'(\\#[-a-z\\d_]*)?$',
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
'(\\#[-a-z\\d_]*)?$',
'i'
) // fragment locator
@ -107,12 +107,20 @@ export default {
},
checkValidDomainUrl(url) {
if (url.includes('localhost')) {
if (url.includes('localhost') || url.includes('127.0.0.1')) {
return true
}
let pattern = new RegExp(
'^([0-9A-Za-z-\\.@:%_+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?'
)
'^(https?:\\/\\/)?' + // protocol
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
'(\\#[-a-z\\d_]*)?$',
'i'
) // fragment locator
return !!pattern.test(url)
},