Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/rwu823/ienv
- Owner: rwu823
- License: mit
- Created: 2017-12-23T01:47:13.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:40:31.000Z (11 months ago)
- Last Synced: 2024-10-31T19:41:44.641Z (14 days ago)
- Topics: browser, css, detect, env, is, is-env, node, server
- Language: TypeScript
- Size: 111 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.