# envs

> Track environment variable usage

Latest version **0.1.6** (published 2014-05-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install envs
pnpm add envs
yarn add envs
bun add envs
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2014-05-05 |
| First published | 2013-06-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Cameron Bytheway |
| Maintainers | camshaft |
| Keywords | environment, variables |

## Links

- npm: https://www.npmjs.com/package/envs
- Repository: https://github.com/CamShaft/envs
- Issues: https://github.com/CamShaft/envs/issues
- npm.io page: https://npm.io/package/envs

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ~0.8.1
- [require-component](https://npm.io/package/require-component.md) ~0.1.0

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

- 0.1.6 (latest) — 2014-05-05
- 0.1.5 — 2014-04-22
- 0.1.4 — 2013-10-10
- 0.1.3 — 2013-09-10
- 0.1.2 — 2013-07-13
- 0.1.1 — 2013-06-22
- 0.1.0 — 2013-06-11

## README

envs
====

Track environment variable usage

Usage
-----

```js
var envs = require('envs');

// enable tracing
env.trace = true;

console.log(envs('NODE_ENV'));
// "production"

console.log(envs('NONEXISTANT', 'my default value'));
// "my default value"

console.log(env.usages);
// { NODE_ENV: 
//   [ { lineno: '/Users/cameron/Projects/misc/envs/example.js:3:13',
//       defaultVal: undefined,
//       val: 'production' } ],
//  NONEXISTANT: 
//   [ { lineno: '/Users/cameron/Projects/misc/envs/example.js:6:13',
//       defaultVal: 'my default value',
//       val: 'my default value' } ] }
```

Testing
-------

```sh
$ npm test
```

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