# @pi-team-mn/envkey

> Read an environment key or throw an error if it's not set

Latest version **1.0.6** (published 2019-07-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @pi-team-mn/envkey
pnpm add @pi-team-mn/envkey
yarn add @pi-team-mn/envkey
bun add @pi-team-mn/envkey
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2019-07-12 |
| First published | 2018-08-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | pi-team@mn.nl |
| Maintainers | fbloembergen, kennethmartis |

## Links

- npm: https://www.npmjs.com/package/@pi-team-mn/envkey
- Repository: https://github.com/pi-team-mn/envkey
- Homepage: https://github.com/pi-team-mn/envkey#readme
- Issues: https://github.com/pi-team-mn/envkey/issues
- npm.io page: https://npm.io/package/@pi-team-mn/envkey

## Recent versions

- 1.0.6 (latest) — 2019-07-12
- 1.0.5 — 2019-07-12
- 1.0.4 — 2019-02-24
- 1.0.3 — 2018-08-14
- 1.0.2 — 2018-08-10
- 1.0.1 — 2018-08-10
- 1.0.0 — 2018-08-10

## README

# @pi-team-mn/envkey
<a href="https://circleci.com/gh/pi-team-mn/envkey/tree/master">
        <img src="https://circleci.com/gh/pi-team-mn/envkey/tree/master.svg?style=svg"
            alt="build status"></a>

Read an environment key or throw an error if it's not set


```javascript
import { envkey } from '@pi-team-mn/envkey';

console.log(process.env.MY_ENV_KEY); // 'thevalue'
const MY_ENV_KEY_VALUE = envkey(MY_ENV_KEY);
console.log(MY_ENV_KEY_VALUE);  // 'thevalue'

console.log(process.env.NOT_SET); // undefined
const NOT_SET_VALUE = envkey(NOT_SET); // throws an error
```

---
_Source: https://npm.io/package/@pi-team-mn/envkey · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
