0.2.0 • Published 7 years ago
your-is-mobile v0.2.0
your-is-mobile
npm i your-is-mobile
isMobile(userAgent)
判断当前是否移动端浏览器环境
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')