# ienv

> Is Env - Environment Detecter

Latest version **2.0.0** (published 2018-10-12) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2018-10-12 |
| First published | 2017-12-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Rocky Wu |
| Maintainers | rwu823 |
| Keywords | env, is, is-env, detect, node, browser, server, client, global |

## Links

- npm: https://www.npmjs.com/package/ienv
- Repository: https://github.com/rwu823/ienv
- Homepage: https://github.com/rwu823/ienv#readme
- Issues: https://github.com/rwu823/ienv/issues
- npm.io page: https://npm.io/package/ienv

## 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

- 2.0.0 (latest) — 2018-10-12
- 1.0.0 — 2017-12-28
- 0.0.2 — 2017-12-23
- 0.0.1 — 2017-12-23

## README

<h1 align="center">
  <img width="180" src="./assets/logo.png" />
</h1>
<p align="center">
  <a href="https://github.com/rwu823/ienv/releases">
    <img src="https://flat.badgen.net/github/release/rwu823/ienv" />
  </a>
  <a href="https://www.npmjs.com/package/ienv">
    <img src="https://flat.badgen.net/npm/v/ienv" />
  </a>
  <a href="https://circleci.com/gh/rwu823/ienv" alt="Build Status">
    <img src="https://flat.badgen.net/circleci/github/rwu823/ienv/master" />
  </a>
  <a href="https://codecov.io/gh/rwu823/ienv" alt="Coverage">
    <img src="https://flat.badgen.net/codecov/c/github/rwu823/ienv" />
  </a>
  <img src="https://flat.badgen.net/github/license/rwu823/ienv" />
</p>

## Installation

```sh
$ yarn add ienv
```

## Usage

```js
import env, { isNode, isDev } from 'ienv'
```

## Exports CONSTANTS

### env: string

Get `process.NODE_ENV` default is `development`

### isDev: boolean

```js
process.NODE_ENV === 'development'
```

### isProd: boolean

```js
process.NODE_ENV === 'production'
```

### isBrowser: boolean

Check if in browser

### isNode: boolean

Check if in Node

### Global

Returns `window` in browser, `global` in Node.

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