🥕 设备相关
isBrowser
是否为浏览器环境
js
/**
 * @function isBrowser
 * @description 判断是否为浏览器环境
 * @returns {boolean} 返回判断结果
 * @example if(isBrowser()){...}
 */
getOS
获取操作系统类型
js
/**
 * @function getOS
 * @description 获取设备的操作系统
 * @returns {string} 返回操作系统
 * @example getOS() // => 'MacOS'
 */
//return Windows Phone|Symbian|Tablet|Ios|Android|FireFox|Chrome|Pc|Unkonwn
isWeiXin
是否为微信设备
js
/**
 * @function isWeiXin
 * @description 判断是否为微信浏览器
 * @returns {boolean} true or false
 * @example isWeiXin() // => true
 */
isMobile
是否为移动设备
js
/**
 * @function isMobile
 * @description 判断是否为移动端
 * @returns {boolean} 返回判断结果
 * @example isMobile() // => true
 */
isApple
是否为apple设备
js
/**
 * @function isApple
 * @description 判断是否为苹果设备
 * @returns {boolean} 返回判断结果
 * @example isApple() // => true
 */
isAndroid
是否为安卓设备
js
/**
 * @function isAndroid
 * @description 判断是否为安卓设备
 * @returns {boolean} 返回判断结果
 * @example isAndroid() // => true
 */