2.0.1 • Published 6 years ago
@nitra/isenv v2.0.1
isenv
Installation
$ npm install @nitra/isenv --saveor
$ yarn add @nitra/isenvUsage with ES Modules
"use strict";
import { isDev, isProd } from "@nitra/isenv";
{
console.log("is production =", isProd);
/* ... */
if (isDev) {
/* ... */
}
}Usage with require
"use strict";
const { isDev, isProd } = reuire("@nitra/isenv");
{
console.log("is production =", isProd);
/* ... */
if (isDev) {
/* ... */
}
}Variables
Available vars
| Signature | Description |
|---|---|
isDev -> boolean | True if the env it development |
isProd -> boolean | True if the env is production |
isTest -> boolean | True if the env is test |
License
This software is released under the MIT License.