0.0.2 • Published 4 years ago
whitchapp v0.0.2
whitchapp
查询浏览器环境,移动端还是PC端。使用的操作系统及移动端常见APP类型。
一、安装
# install dependencies
npm install whitchapp --save
二、返回
{
mobile: true // true:移动端。
platform: {
os: 'android', // android iphone ipad ipod wp kindle blackberry 或 默认值:''
app: 'weixin' // weixin QQ weibo DingDing 或 默认值:browser
browser: 'chrome' // chrome firefox ie safari opera
}
}
注:platform.app 字段只有移动端有。platform.browser字段只有PC下有