2.0.0 • Published 9 years ago
observ-mobile v2.0.0
observ-mobile
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