mdetect
v1.2.3
Published
mobile detect by UA or Viewport
Downloads
44
Readme
mdetect
Install
npm i mdetect
Usage
import { isMobileUA, isMobileView } from 'mdetect'
if(isMobileUA()) alert('Using Mobile Browser');
if(isMobileView()) alert('Mobile Viewport');
Method list
isMobileUA
isIOS
isAndroid
isWechat
isWechatAndroid
isWechatIOS
isMobileView
isTabletView
isMediumView
isLargeView
Viewport setting (same as bootstrap) mobile < 768 < tablet < 992 < medium < 1200 < large
isRetina
isHighResolution
Resource
Regex was made by detectmobilebrowsers