3.0.1 • Published 3 months ago

@nordicsemiconductor/from-env v3.0.1

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
3 months ago

fromEnv npm version

GitHub Actions semantic-release Renovate @commitlint/config-conventional code style: prettier ESLint: TypeScript

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-env

Usage

See fromEnv.spec.ts.

3.0.1

3 months ago

3.0.0

5 months ago

2.0.0

1 year ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago