This commit is contained in:
2023-08-11 10:45:20 +08:00
commit 161ca982f3
31850 changed files with 2706500 additions and 0 deletions

4
node_modules/vant/es/utils/validate/date.js generated vendored Normal file
View File

@ -0,0 +1,4 @@
import { isNaN } from './number';
export function isDate(val) {
return Object.prototype.toString.call(val) === '[object Date]' && !isNaN(val.getTime());
}

5
node_modules/vant/es/utils/validate/email.js generated vendored Normal file
View File

@ -0,0 +1,5 @@
/* eslint-disable */
export function isEmail(value) {
var reg = /^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/;
return reg.test(value.trim());
}

4
node_modules/vant/es/utils/validate/mobile.js generated vendored Normal file
View File

@ -0,0 +1,4 @@
export function isMobile(value) {
value = value.replace(/[^-|\d]/g, '');
return /^((\+86)|(86))?(1)\d{10}$/.test(value) || /^0[0-9-]{10,13}$/.test(value);
}

11
node_modules/vant/es/utils/validate/number.js generated vendored Normal file
View File

@ -0,0 +1,11 @@
export function isNumeric(val) {
return /^\d+(\.\d+)?$/.test(val);
}
export function isNaN(val) {
if (Number.isNaN) {
return Number.isNaN(val);
} // eslint-disable-next-line no-self-compare
return val !== val;
}

9
node_modules/vant/es/utils/validate/system.js generated vendored Normal file
View File

@ -0,0 +1,9 @@
import { isServer } from '..';
export function isAndroid() {
/* istanbul ignore next */
return isServer ? false : /android/.test(navigator.userAgent.toLowerCase());
}
export function isIOS() {
/* istanbul ignore next */
return isServer ? false : /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase());
}