# @ansaro/validate-env

> Validate environment variables in Node.js

Latest version **1.1.0** (published 2018-06-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ansaro/validate-env
pnpm add @ansaro/validate-env
yarn add @ansaro/validate-env
bun add @ansaro/validate-env
```

## 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.1.0 |
| Published | 2018-06-15 |
| First published | 2018-05-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 109.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Max Beatty |
| Maintainers | bgoldberg15, maxbeatty |
| Keywords | env |

## Links

- npm: https://www.npmjs.com/package/@ansaro/validate-env
- Repository: https://github.com/ansaro-ai/validate-env
- Homepage: https://github.com/ansaro-ai/validate-env#readme
- Issues: https://github.com/ansaro-ai/validate-env/issues
- npm.io page: https://npm.io/package/@ansaro/validate-env

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 1.1.0 (latest) — 2018-06-15
- 1.0.0 — 2018-05-31

## README

# validate-env [![CircleCI](https://circleci.com/gh/ansaro-ai/validate-env/tree/master.svg?style=svg&circle-token=e5ccae6c49661d4de4e9b61d48ac1721de0b4103)](https://circleci.com/gh/ansaro-ai/validate-env/tree/master) [![codecov](https://codecov.io/gh/ansaro-ai/validate-env/branch/master/graph/badge.svg)](https://codecov.io/gh/ansaro-ai/validate-env)
Validate environment variables in Node.js

```js
require("@ansaro/validate-env")(["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY"])
```

Pass an array of strings you want to make sure exist in [`process.env`](http://nodejs.org/api/process.html#process_process_env). An error will be thrown listing any that are missing _unless_ `process.env.NODE_ENV` is set to `test`. This allows you to easily test your code without needing to mock or stub this module.

---
_Source: https://npm.io/package/@ansaro/validate-env · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
