# mobile-redirect

> A simple Express middleware to redirect the mobile user.

Latest version **0.0.1** (published 2014-11-22) · MIT license · 0 weekly downloads

## Install

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

## 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.0.1 |
| Published | 2014-11-22 |
| First published | 2014-11-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | iwatakeshi |
| Maintainers | iwatakeshi |
| Keywords | mobile, redirect, express, url |

## Links

- npm: https://www.npmjs.com/package/mobile-redirect
- Repository: https://github.com/iwatakeshi/mobile-redirect
- Issues: https://github.com/iwatakeshi/mobile-redirect/issues
- npm.io page: https://npm.io/package/mobile-redirect

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^2.4.1
- [is-mobile](https://npm.io/package/is-mobile.md) ^0.2.2

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 0.0.1 (latest) — 2014-11-22

## README

mobile-redirect
===============

A simple Express middleware to redirect the mobile user.

mobile-redirect will detect if the request is a mobile device. If so, it will redirect the user to your desired path.

##Install

```bash
npm install --save mobile-redirect
```

##Usage

```js
var mdirect = require('mobile-redirect');

app.use(mdirect());
```

###API

`mdirect(opt)`

* *Returns the middleware function that redirects the user to a path.*
* *Accepts an option object to change the default path.*

###Options

```js
//default
{
    redirectPath: '/mobile'
}
```

###Test

```bash
npm test
```

*Note: Most tests are covered by [is-mobile](https://github.com/juliangruber/is-mobile). Also, mobile-redirect will cover most mobile devices where is-mobile fails.*

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