your-is-mobile
0.2.0 • Public • Published your-is-mobile
isMobile([userAgent])
userAgent
<string> 浏览器 ua 信息。默认 navigator.userAgent
- return <boolean> 是否移动端环境
判断当前是否移动端浏览器环境
import isMobile from 'your-is-mobile'
isMobile()
isMobile('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36')
Readme
Keywords
nonePackage Sidebar
Install
Weekly Downloads