$ npm install universal-device
System info.
$ npm install universal-device --save
import { platform, appName, screenWidth, screenHeight, appVersion } from 'universal-device';
appName: string
app name or browser name
appVersion: string
app version or browser version info
platform: string
platform: 'Android'、'iOS'、'MacIntel', etc.
screenWidth: number
Screen width in px
screenHeight: number
Screen height in px
devicePixelRatio: number
The ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device.(Not supported in Weex)
© 2010 - cnpmjs.org x YWFE | Home | YWFE