chore: prettier all ts code
This commit is contained in:
@@ -2,6 +2,7 @@ import { isNaN } from './number';
|
||||
|
||||
export function isDate(date: Date): boolean {
|
||||
return (
|
||||
Object.prototype.toString.call(date) === '[object Date]' && !isNaN(date.getTime())
|
||||
Object.prototype.toString.call(date) === '[object Date]' &&
|
||||
!isNaN(date.getTime())
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
export function isMobile(value: string): boolean {
|
||||
value = value.replace(/[^-|\d]/g, '');
|
||||
return /^((\+86)|(86))?(1)\d{10}$/.test(value) || /^0[0-9-]{10,13}$/.test(value);
|
||||
return (
|
||||
/^((\+86)|(86))?(1)\d{10}$/.test(value) || /^0[0-9-]{10,13}$/.test(value)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,5 +7,7 @@ export function isAndroid(): boolean {
|
||||
|
||||
export function isIOS(): boolean {
|
||||
/* istanbul ignore next */
|
||||
return isServer ? false : /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase());
|
||||
return isServer
|
||||
? false
|
||||
: /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user