https://github.com/bendrucker/screen-orientation
Get the current screen orientation
https://github.com/bendrucker/screen-orientation
Last synced: 22 days ago
JSON representation
Get the current screen orientation
- Host: GitHub
- URL: https://github.com/bendrucker/screen-orientation
- Owner: bendrucker
- License: mit
- Created: 2015-08-24T19:30:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-10-12T14:50:28.000Z (over 3 years ago)
- Last Synced: 2025-04-15T00:02:40.047Z (22 days ago)
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome-github-star - screen-orientation
README
# screen-orientation [](https://travis-ci.org/bendrucker/screen-orientation) [](https://greenkeeper.io/)
> Get the current screen orientation
## Install
```
$ npm install --save screen-orientation
```## Usage
```js
var screenOrientation = require('screen-orientation')screenOrientation()
//=> {direction: 'landscape', version: 'primary'}
```## API
#### `screenOrientation()` -> `object`
Returns the current screen orientation (direction and version).
## License
MIT © [Ben Drucker](http://bendrucker.me)