[improvement] adjust utils

This commit is contained in:
陈嘉涵
2019-06-06 11:49:39 +08:00
parent f5059ea6ba
commit d7a5be67fe
37 changed files with 96 additions and 82 deletions

View File

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