# check-browser

> Ultra-thin wrapper around bowser with simple declarative interface

Latest version **0.1.7** (published 2015-10-23) · MIT license · 0 weekly downloads

## Install

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

## 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.1.7 |
| Published | 2015-10-23 |
| First published | 2015-03-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ashaffer |
| Maintainers | ashaffer88 |
| Keywords | check, browser, browser, support, supported, browser, bowser |

## Links

- npm: https://www.npmjs.com/package/check-browser
- Repository: https://github.com/ashaffer/check-browser
- Issues: https://github.com/ashaffer/check-browser/issues
- npm.io page: https://npm.io/package/check-browser

## Dependencies (1)

- [bowser](https://npm.io/package/bowser.md) ^1.0.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

- 0.1.7 (latest) — 2015-10-23
- 0.1.6 — 2015-07-08
- 0.1.5 — 2015-03-03
- 0.1.4 — 2015-03-03
- 0.1.3 — 2015-03-03
- 0.1.2 — 2015-03-03
- 0.1.1 — 2015-03-03
- 0.1.0 — 2015-03-03

## README

# check-browser

Ultra-thin wrapper around bowser with simple declarative interface

## Usage

check-browser takes a single argument, a map of browser names to minimum version numbers, and returns a boolean value indicating whether or not the current browser is equal to or greater than one of the allowed ones.  The browser names it uses are the same as [bowser's](ded/bowser) keys:

  * `chrome`
  * `safari`
  * `msie`
  * `opera`
  * `seamonkey`
  * `blackberry`
  * `bada`
  * `tizen`
  * `sailfish`
  * `android`
  * `windowsphone`
  * `ios` (`iphone` / `ipad` / `ipod`)
  * `firefoxos`
  * `webos`

(not all of these are browsers, I know, but they will all work)

You may also use the `others` property to toggle whitelist/blacklist behavior.  If `others` is true, browsers not explicitly listed will be considered valid.  `others` defaults to false.

check-browser is also forgiving about capitalization, chrome/Chrome/CHROME, are all acceptable.

## Examples

```javascript
checkBrowser({
  msie: 7,
  chrome: 10,
  firefox: 3
});
```

```javascript
checkBrowser({chrome: 33}) // Returns false for Firefox
checkBrowser({chrome: 33, others: true}) // Returns true for Firefox
```

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