Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/matswainson/screen-info-js
- Owner: matswainson
- Created: 2017-01-18T14:20:29.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-03-26T02:38:27.000Z (over 2 years ago)
- Last Synced: 2024-10-09T17:41:53.179Z (about 1 month ago)
- Language: JavaScript
- Size: 104 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
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