@haensl/environments
JS runtime environments. Simple JSON object.
Installation
Via npm
$ npm install -S @haensl/environments
Via yarn
$ yarn add @haensl/environments
Usage
-
Install @haensl/environments
-
Use environments in your projects:
ESM, i.e. import
import environments from '@haensl/environments';
if (currentEnvironment === environments.production) {
}
CJS, i.e. require
const environments = require('@haensl/environments');
if (currentEnvironment === environments.production) {
}
Synopsis
The environments
object is a simple JSON object that maps to strings:
{
"development": "development",
"production": "production",
"qa": "qa",
"test": "test"
}