National Pizza Magistrate

    universal-device
    TypeScript icon, indicating that this package has built-in type declarations

    2.3.1 • Public • Published

    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

    Install

    npm i universal-device

    DownloadsWeekly Downloads

    832

    Version

    2.3.1

    License

    BSD-3-Clause

    Unpacked Size

    32.3 kB

    Total Files

    29

    Last publish

    Collaborators

    • rax-publisher
    • yacheng
    • zeroling