1.0.3 • Published 3 years ago

kc-screen-data v1.0.3

Weekly downloads
4
License
ISC
Repository
github
Last release
3 years ago

Screen Data

browser Obtain screen data.

Install

npm install kc-screen-data

Data

  • Screen: Whole screen data

    • aspect: Aspect ratio (E.g: 16:9)
    • density: Pixel density (E.g: 2)
    • width: Screen width (E.g: 1366)
    • height: Screen height (E.g: 768)
    • orientation: "landscape" or "portrait"
    • resolution: width and height string (E.g: 1366x768)
  • Viewport: Browser's viewport data

    • aspect: Aspect ratio (E.g: 16:9)
    • density: Pixel density (E.g: 2)
    • width: Viewport width (E.g: 1366)
    • height: Viewport height (E.g: 768)
    • orientation: "landscape" or "portrait"
    • resolution: width and height string (E.g: 1366x768)

Use

var sc = screen-data();
console.log(sc);