Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rwu823/ienv

:computer: Is Env - Environment Detecter
https://github.com/rwu823/ienv

browser css detect env is is-env node server

Last synced: 4 days ago
JSON representation

:computer: Is Env - Environment Detecter

Awesome Lists containing this project

README

        


















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