Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/matswainson/screen-info-js

JavaScript detection of device screen size, orientation & pixel density
https://github.com/matswainson/screen-info-js

Last synced: 19 days ago
JSON representation

JavaScript detection of device screen size, orientation & pixel density

Awesome Lists containing this project

README

        

![screen-info.js](http://matswainson.com/wp-content/uploads/2017/01/detect-screen.png)

# screen-info.js

JavaScript detection of device screen size, orientation & pixel density.

### Example

```js
var screenInfo = require('screen-info-js');

/* {
...
maxTouchPoints: 5,
orientation: 'landscape'
...
} */

console.log(screenInfo.maxTouchPoints); // 5
console.log(screenInfo.orientation); // landscape
```

`screenInfo` provides information on:

- height
- maxTouchPoints
- orientation
- pixelDensity
- retinaDisplay
- width