om

observ-mobile

Observable mobile viewport state

Showing:

Popularity

Downloads/wk

6

GitHub Stars

1

Maintenance

Last Commit

2yrs ago

Contributors

2

Package

Dependencies

5

Size (min+gzip)

1.3KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

observ-mobile Build Status

Observable mobile viewport state

Install

$ npm install --save observ-mobile

Usage

var device = require('observ-mobile')

device(function onChange () {
  // ...
})

device.mobile()
//=> true/false

device.orientation()
//=> landscape/portrait

API

device([callback]) -> function

callback

Type: function

A callback to call whenever mobile state or orientation changes.

License

MIT © Ben Drucker

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100