# observ-mobile

> Observable mobile viewport state

Latest version **2.0.0** (published 2015-09-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install observ-mobile
pnpm add observ-mobile
yarn add observ-mobile
bun add observ-mobile
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2015-09-02 |
| First published | 2015-08-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ben Drucker |
| Maintainers | bendrucker |
| Keywords | observable, mobile, viewport |

## Links

- npm: https://www.npmjs.com/package/observ-mobile
- Repository: https://github.com/bendrucker/observ-mobile
- Homepage: https://github.com/bendrucker/observ-mobile#readme
- Issues: https://github.com/bendrucker/observ-mobile/issues
- npm.io page: https://npm.io/package/observ-mobile

## Dependencies (5)

- [global](https://npm.io/package/global.md) ~4.3.0
- [observ](https://npm.io/package/observ.md) ~0.2.0
- [observ-struct](https://npm.io/package/observ-struct.md) ~6.0.0
- [minimum-viewport](https://npm.io/package/minimum-viewport.md) ~1.0.0
- [screen-orientation](https://npm.io/package/screen-orientation.md) ~1.0.0

## Recent versions

- 2.0.0 (latest) — 2015-09-02
- 1.0.2 — 2015-08-25
- 1.0.1 — 2015-08-24
- 1.0.0 — 2015-08-24

## README

# observ-mobile [![Build Status](https://travis-ci.org/bendrucker/observ-mobile.svg?branch=master)](https://travis-ci.org/bendrucker/observ-mobile)

> Observable mobile viewport state


## Install

```
$ npm install --save observ-mobile
```


## Usage

```js
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](http://bendrucker.me)

---
_Source: https://npm.io/package/observ-mobile · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
