# chopperjs

> A modern universal device detection package

Latest version **1.1.1** (published 2016-08-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install chopperjs
pnpm add chopperjs
yarn add chopperjs
bun add chopperjs
```

## 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 | 1.1.1 |
| Published | 2016-08-30 |
| First published | 2016-08-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Joris Hermans |
| Maintainers | jorishermans |
| Keywords | device, detection, useragent, isomorphic, universal, browser |

## Links

- npm: https://www.npmjs.com/package/chopperjs
- Homepage: https://github.com/jorishermans/chopperjs
- Issues: https://github.com/jorishermans/chopperjs/issues
- npm.io page: https://npm.io/package/chopperjs

## Dependencies (2)

- [babel-polyfill](https://npm.io/package/babel-polyfill.md) ^6.9.1
- [babel-plugin-transform-async-to-generator](https://npm.io/package/babel-plugin-transform-async-to-generator.md) ^6.8.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2016-08-30
- 1.1.0 — 2016-08-29
- 1.0.2 — 2016-08-13
- 1.0.1 — 2016-08-13

## README

# chopperjs

Chopperjs is a modern device detection framework that uses node.js.
It detects a mobile, tablet and desktop device in the browser and on the server.

## basic example

```javascript
var chopper = require('chopperjs');

var device = new chopper.DeviceDetect();
console.log(device.isDesktop());
console.log(device.isTablet());
console.log(device.isMobile());
```

## serverside example

You can use this device detection functionality in your express.js application like below.

```javascript
var chopper = require('chopperjs');

...

app.get('/', (req, res) => {
  var device = new chopper.DeviceDetect({req: req});
  res.render('index', {
    title: 'chopperjs example',
    mobile: device.isMobile(),
    tablet: device.isTablet(),
    desktop: device.isDesktop()
  });
});
```

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