devices.json

1.0.0 • Public • Published

Simulated Devices

devices.json is a catalog of common web-enabled devices and their properties.

{
  TYPES: [ "phones", … ],
  phones: [
    {
      name: "LePhone",
      width: 360,
      height: 640,
      pixelRatio: 3,
      userAgent: "Mozilla/5.0 (Mobile; rv:39.0) Gecko/39.0 Firefox/39.0",
      touch: true
    }
  ], …
}

Device properties

  • name brand and model(s).
  • width viewport width.
  • height viewport height.
  • pixelRatio ratio from viewport to physical screen pixels.
  • userAgent UA string of the device's browser.
  • touch whether it has a touch screen.
  • os the OS type it usually ships with.

Device types

  • phones (smart phones)
  • tablets
  • laptops
  • televisions
  • consoles (gaming consoles)
  • watches (smart watches)

Downloads

Contribute

  • Use the check.html helper.
  • Use node test.js to verify your devices.json.
  • Submit pull requests.

Sources

Readme

Keywords

none

Package Sidebar

Install

npm i devices.json

Weekly Downloads

14

Version

1.0.0

License

CC0-1.0

Unpacked Size

13.7 kB

Total Files

6

Last publish

Collaborators

  • janx