【文件属性】:
文件名称:mars-detect:操作系统和浏览器 ua 检测
文件大小:7KB
文件格式:ZIP
更新时间:2021-05-18 21:22:18
mars ua JavaScript
mars-detect
系统和浏览器 ua 检测
安装
$ npm install mars-detect --save
使用方法
import detect from 'mars-detect';
console.log(detect.os.ios) // true/false
文档
对外暴露一个如下Object
{
os: {
[ios|android|wp]: true|false,
version: '9.6.1'
},
browser: {
[weixin|weibo|qq|webkit|ie|safari]: true|false,
version: ''
}
}
【文件预览】:
mars-detect-master
----.gitignore(884B)
----README.md(585B)
----LICENSE(1KB)
----package.json(609B)
----dist()
--------detect.js(7KB)
----src()
--------index.js(4KB)
----.babelrc(26B)
----webpack.config.js(377B)