3.0.1 • Published 2 years ago
@nordicsemiconductor/from-env v3.0.1
fromEnv 
Helper function which ensures that required environment variables are set.
Example
import { fromEnv } from "@nordicsemiconductor/from-env";
const { env } = fromEnv({
env: "MY_ENV",
})(process.env);This will throw an exception if MY_ENV is not set on process.env. Otherwise,
env will not contain the value of process.env.MY_ENV.
Installation
npm i --save-dev --save-exact @nordicsemiconductor/from-envUsage
See fromEnv.spec.ts.