# @gct256/browser-detect

> browser detection libray, based on current-device.

Latest version **1.0.2** (published 2019-07-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @gct256/browser-detect
pnpm add @gct256/browser-detect
yarn add @gct256/browser-detect
bun add @gct256/browser-detect
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-07-08 |
| First published | 2018-11-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >= 8 |
| Dependencies | 1 |
| Unpacked size | 41 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | gct256+github@gmail.com |
| Maintainers | gct256 |

## Links

- npm: https://www.npmjs.com/package/@gct256/browser-detect
- Repository: https://github.com/gct256/browser-detect
- Homepage: https://github.com/gct256/browser-detect#readme
- Issues: https://github.com/gct256/browser-detect/issues
- npm.io page: https://npm.io/package/@gct256/browser-detect

## Dependencies (1)

- [current-device](https://npm.io/package/current-device.md) ^0.8.1

## Recent versions

- 1.0.2 (latest) — 2019-07-08
- 1.0.1 — 2018-11-30
- 1.0.0 — 2018-11-30

## README

# browser-detect

A browser detecion libray, based on [current-device](https://github.com/matthewhudson/current-device).

## usage

```html
<script src="browser-detect.min.js"></script>
<style>
  html.firefox .foo {
    /* style for firefox */
  }
  html.chrome .foo {
    /* style for chrome */
  }
</style>
<script>
  if (window.browserDetect.firefox()) {
    // code for firefox
  }
  if (window.browserDetect.chrome()) {
    // code for chrome
  }
</script>
```

---

```javascript
import { browserDetect } from 'browser-detect'; // ES modules
const { browserDetect } = require('browser-detect'); // CommonJS

if (broewserDetect.firefox()) {
  // code for firefox
}
if (broewserDetect.chrome()) {
  // code for chrome
}
```

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