Socket
Socket
Sign inDemoInstall

universal-device

Package Overview
Dependencies
2
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    universal-device

System info.


Version published
Weekly downloads
614
decreased by-48.75%
Maintainers
3
Install size
46.8 kB
Created
Weekly downloads
 

Readme

Source

universal-device npm

System info.

Supported

browser weex miniApp wechatMiniprogram quickApp bytedanceMicroApp

Install

$ npm install universal-device --save

Usage


// How to use it in quickapp
// import { platform, appName, screenWidth, screenHeight, appVersion } from 'universal-device/lib/quickapp;

import { platform, appName, screenWidth, screenHeight, appVersion } from 'universal-device';

APIS

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.

Keywords

FAQs

Last updated on 27 Aug 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc