UNPKG

js-wrench

Version:

JS函数库

19 lines (17 loc) 380 B
/** * @description 是否Android * * @return {*} {boolean} 返回一个布尔值 * @example isAndroid() => true|false */ const isAndroid = (): boolean => { let userAgentInfo: string = navigator.userAgent if ( userAgentInfo.indexOf('Android') > -1 || userAgentInfo.indexOf('Linux') > -1 ) { return true } return false } export default isAndroid