# env-autoload

> Shortcut for loading .env files automatically.

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

## Install

```sh
npm install env-autoload
pnpm add env-autoload
yarn add env-autoload
bun add env-autoload
```

## 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-26 |
| First published | 2018-06-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 1 |
| Unpacked size | 130.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kevin R. Whitley |
| Maintainers | kwhitley |
| Keywords | redux, boilerplate, mapping, actions, reducer, simple, react, immutable, redux-sagas, redux-thunk, reselect |

## Links

- npm: https://www.npmjs.com/package/env-autoload
- Repository: https://github.com/kwhitley/env-autoload
- Homepage: https://github.com/kwhitley/env-autoload#readme
- Issues: https://github.com/kwhitley/env-autoload/issues
- npm.io page: https://npm.io/package/env-autoload

## Dependencies (1)

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

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2018-06-26
- 1.0.2 — 2018-06-26
- 1.0.1 — 2018-06-13
- 1.0.0 — 2018-06-13

## README

.env autoloader
=======

[![npm version](https://badge.fury.io/js/env-autoload.svg)](https://www.npmjs.com/package/env-autoload)
[![node version support](https://img.shields.io/node/v/env-autoload.svg)](https://www.npmjs.com/package/env-autoload)
[![Build Status via Travis CI](https://travis-ci.org/kwhitley/env-autoload.svg?branch=master)](https://travis-ci.org/kwhitley/env-autoload)
[![Coverage Status](https://coveralls.io/repos/github/kwhitley/env-autoload/badge.svg?branch=master)](https://coveralls.io/github/kwhitley/env-autoload?branch=master)
[![NPM downloads](https://img.shields.io/npm/dt/env-autoload.svg?style=flat-square)](https://www.npmjs.com/package/env-autoload)

## Why?
Because who wants bootstrap files in their boilerplate/templates?
This is really just a code-smell implementation fix for using the
wonderful [dotenv](https://www.npmjs.com/package/dotenv) library.

## Usage

#### .env
```bash
TEST='foo bar baz'
```

#### index.js (server)
```js
import env from 'env-autoload'     // require('env-autoload') works fine too

process.env.TEST === 'foo bar baz' // true
env.TEST === 'foo bar baz'         // also true (convenience export)
```

## Changelog
- 1.1.0 - added process.env as convenience export (as well as to pass linting tests)

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