get-environment

A function that gets the environment at run-time. EG.: "dev", "int", "rc", "prod"

Installation#

npm install @iqmetrix/get-environment

Interface#

type Environment = "int" | "rc" | "prod" | "dev";
const getEnvironment: () => Promise<Environment>

Example#

import getEnvironment from '@iqmetrix/get-environment';
const env = await getEnvironment();

See tests for more examples.

Sources#

Last updated on by Olga Tkatska