chore: prettier all ts code

This commit is contained in:
陈嘉涵
2020-01-19 15:27:28 +08:00
parent 04c49b645a
commit 207e80f396
19 changed files with 124 additions and 68 deletions
+2 -1
View File
@@ -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())
);
}
+3 -1
View File
@@ -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)
);
}
+3 -1
View File
@@ -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());
}