Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bendrucker/screen-orientation
Get the current screen orientation
https://github.com/bendrucker/screen-orientation
Last synced: 14 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 (about 3 years ago)
- Last Synced: 2024-11-17T09:14:50.936Z (25 days ago)
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 7
- Watchers: 3
- 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 [![Build Status](https://travis-ci.org/bendrucker/screen-orientation.svg?branch=master)](https://travis-ci.org/bendrucker/screen-orientation) [![Greenkeeper badge](https://badges.greenkeeper.io/bendrucker/screen-orientation.svg)](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)