# @seed-media/env

> ## Usage

Latest version **2.2.1** (published 2017-09-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @seed-media/env
pnpm add @seed-media/env
yarn add @seed-media/env
bun add @seed-media/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 | 2.2.1 |
| Published | 2017-09-08 |
| First published | 2017-03-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ben Swinburne |
| Maintainers | benswinburne, seed-media-user |

## Links

- npm: https://www.npmjs.com/package/@seed-media/env
- Repository: https://github.com/seed-media/env
- Issues: https://github.com/seed-media/env/issues
- npm.io page: https://npm.io/package/@seed-media/env

## Dependencies (1)

- [dotenv](https://npm.io/package/dotenv.md) ^4.0.0

## Recent versions

- 2.2.1 (latest) — 2017-09-08
- 2.2.0 — 2017-09-08
- 2.1.0 — 2017-09-08
- 2.0.1 — 2017-09-08
- 2.0.0 — 2017-09-08
- 1.1.0 — 2017-03-27
- 1.0.1 — 2017-03-27
- 1.0.0 — 2017-03-25

## README

# Environment Loader/Reader

## Usage

    const env = require('@seed-media/env')

    // Getting variables
    const databaseHost = env.get('DB_HOST')

    // Getting variables with a default
    const endpoint = env.get('ENDPOINT', 'https://localhost')

    // Setting variables
    env.set('MY_ENV_VAR', 'value')

## Notes

Truthy or falsey envrionment variables are converted to boolean values. For
example

    FOO=true // bool true
    FOO=1 // bool true
    FOO=false // bool false
    FOO=0 // bool false

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