Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

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)