2.0.0 • Published 9 years ago

observ-mobile v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

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