# browser-detection

> browser-detection [![Build Status](https://travis-ci.org/sub2home/browser-detection.png?branch=master)](https://travis-ci.org/sub2home/browser-detection) ========================

Latest version **0.3.3** (published 2014-07-29) · 0 weekly downloads

## Install

```sh
npm install browser-detection
pnpm add browser-detection
yarn add browser-detection
bun add browser-detection
```

## 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.3.3 |
| Published | 2014-07-29 |
| First published | 2014-07-17 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | schickling |

## Links

- npm: https://www.npmjs.com/package/browser-detection
- npm.io page: https://npm.io/package/browser-detection

## Recent versions

- 0.3.3 (latest) — 2014-07-29
- 0.3.2 — 2014-07-28
- 0.3.1 — 2014-07-17

## README

browser-detection [![Build Status](https://travis-ci.org/sub2home/browser-detection.png?branch=master)](https://travis-ci.org/sub2home/browser-detection)
========================

Lightweight package to get information about browser, version and OS.

## Installation
```sh
$ bower install browserdetection --save
```

## Usage

#### Get Data
```javascript
var data = browserDetection();

console.log(data.browser); // chrome
console.log(data.version); // 29
console.log(data.os); // osx
```

#### Add CSS classes to `html` tag

Javascript:
```javascript
browserDetection({
    addClasses: true
});
```

CSS:
```css
html{
    background: white;
}

/* Internet Explorer 7 specific */
html.ie-7{
    background: red;
}

/* Only for OSX users with firefox */
html.osx.firefox{
    background: blue;
}
```

## Todo
* More tests for...
 * osx
 * win
 * linux
 * mobile
* Minification with grunt

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