mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
14 lines
348 B
TypeScript
14 lines
348 B
TypeScript
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());
|
|
}
|