# is-in-browser

> Simple check to see if current app is running in browser

Latest version **2.0.0** (published 2021-02-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-in-browser
pnpm add is-in-browser
yarn add is-in-browser
bun add is-in-browser
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2021-02-07 |
| First published | 2016-03-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Jared Anderson |
| Maintainers | tuxsudo |

## Links

- npm: https://www.npmjs.com/package/is-in-browser
- Repository: https://github.com/tuxsudo/is-in-browser
- Homepage: https://github.com/tuxsudo/is-in-browser#readme
- Issues: https://github.com/tuxsudo/is-in-browser/issues
- npm.io page: https://npm.io/package/is-in-browser

## Recent versions

- 2.0.0 (latest) — 2021-02-07
- 1.1.3 — 2017-01-15
- 1.1.2 — 2017-01-07
- 1.1.1 — 2017-01-07
- 1.1.0 — 2017-01-06
- 1.0.2 — 2016-10-22
- 1.0.1 — 2016-03-15
- 1.0.0 — 2016-03-15

## README

# Is In Browser?

```js
import isBrowser from "is-in-browser";

if (isBrowser) {
  //...
}
```

More thoroughly:

```js
import { isJsDom, isNode, isBrowser } from "is-in-browser";

if (isBrowser) {
  // you're in the browser
  // jsdom considered in browser
}

if (isJsDom) {
  // you're in the JSDom
}

if (isNode) {
  // you're in the Node
}
```

## CommonJS

For those not using Babel / ES6 Modules

```js
var isBrowser = require('is-in-browser').default;

if(isBrowser) { //... }
```

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