# environ

> Pretty secure detection of Node, browser, Electron, Deno, and other execution environments.

Latest version **3.0.3** (published 2020-10-23) · MIT license · 0 weekly downloads

## Install

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

## 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 | 3.0.3 |
| Published | 2020-10-23 |
| First published | 2011-05-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=8 |
| Dependencies | 0 |
| Unpacked size | 9.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Kenny Smith |
| Maintainers | kjs3 |
| Keywords | js env, js environment, browser, browser check, node, node check, is node, is browser, is electron, is deno, is jsdom |

## Links

- npm: https://www.npmjs.com/package/environ
- Repository: https://github.com/kjs3/environ
- Issues: https://github.com/kjs3/environ/issues
- npm.io page: https://npm.io/package/environ

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 3.0.3 (latest) — 2020-10-23
- 3.0.2 — 2020-10-23
- 3.0.1 — 2020-10-23
- 3.0.0 — 2020-10-22
- 1.0.1 — 2020-10-22
- 0.0.1-security — 2016-03-23
- 2.0.0 — 2016-03-22
- 1.3.1 — 2011-12-27
- 1.4.0 — 2011-11-29
- 1.3.0 — 2011-11-29
- 1.2.0 — 2011-11-02
- 1.1.1 — 2011-10-15
- 1.1.0 — 2011-07-21
- 1.0.0 — 2011-05-29

## README

# Environ

Pretty secure detection of Node, browser, Electron, Deno, and other execution environments.

* Zero dependencies.
* Tree-shaking friendly so you're only left with what you use.

## Install

```shell
yarn add environ
```

Or

```shell
npm install --save environ
```

## Usage

```javascript
// esm usage (Typescript, Babel,  Node 12+ with flags)
import { isBrowser } from 'environ'

// commonjs usage
const { isBrowser } = require('environ')

if (isBrowser()) {
  // do something
}
```

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