0.2.0 • Published 7 years ago

your-is-mobile v0.2.0

Weekly downloads
44
License
MIT
Repository
github
Last release
7 years ago

your-is-mobile

npm i 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')
0.2.0

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago