https://github.com/iguntur/mode-env
https://github.com/iguntur/mode-env
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/iguntur/mode-env
- Owner: iguntur
- License: mit
- Created: 2018-08-01T20:34:42.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-02T07:06:34.000Z (almost 7 years ago)
- Last Synced: 2025-01-29T10:16:10.002Z (4 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# mode-env [](https://travis-ci.org/iguntur/mode-env)
> Check `process.env.NODE_ENV`
---
## Install
```
$ npm install mode-env
```## Usage
```js
const env = require('mode-env');// Equivalent: process.env.NODE_ENV === 'development'
console.log(env.isDev());// Equivalent: process.env.NODE_ENV === 'production'
console.log(env.isProd());// Equivalent: process.env.NODE_ENV === 'test'
console.log(env.isTest());// Equivalent: process.env.NODE_ENV === 'debug'
console.log(env.isDebug());
```## API
### env.isDev()
### env.isProd()
### env.isTest()
### env.isDebug()
Return a boolean value
## License
MIT © [Guntur Poetra](http://github.com/iguntur)