# your-is-mobile

> your-is-mobile

Latest version **0.2.0** (published 2018-02-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install your-is-mobile
pnpm add your-is-mobile
yarn add your-is-mobile
bun add your-is-mobile
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2018-02-03 |
| First published | 2018-02-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | zhuweiyou |

## Links

- npm: https://www.npmjs.com/package/your-is-mobile
- Repository: https://github.com/yourjs/your/tree/master/packages/your-is-mobile
- npm.io page: https://npm.io/package/your-is-mobile

## Recent versions

- 0.2.0 (latest) — 2018-02-03
- 0.1.8 — 2018-02-03
- 0.1.7 — 2018-02-03
- 0.1.6 — 2018-02-02
- 0.1.5 — 2018-02-02
- 0.1.4 — 2018-02-02
- 0.1.3 — 2018-02-02
- 0.1.2 — 2018-02-02

## README

# your-is-mobile

```bash
npm i your-is-mobile
```

### isMobile([userAgent])
- `userAgent` <[string]> 浏览器 ua 信息。默认 `navigator.userAgent`
- return <[boolean]> 是否移动端环境

判断当前是否移动端浏览器环境

```js
import isMobile from 'your-is-mobile'

// 当前环境
isMobile()

// 手动传入
isMobile('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36')
```

[string]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "String"
[boolean]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type "Boolean"

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