@jarvisniu/ua
v0.1.1
Published
Detect web environment by user agent
Downloads
274
Readme
ua
Detect web environment by user agent
Usage
Install:
npm install @jarvisniu/ua
Import:
import ua from '@jarvisniu/ua'
Use:
ua.isWindows
// extending
ua.isOpera = ua.value.incluces('OPR/')
API
OS
isWindows
isMacOS
isLinux
isUbuntu
isAndroid
isIOS
Kernel
isChrome
isFirefox
isSafari
isEdge
isIE
Platform
isElectron
isDesktop
isMobile
App
isWechat
isAlipay
License
MIT