# 12g-cleandotenv

> This package enables you to load .env files and return their values as an object.

Latest version **1.0.1** (published 2017-05-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install 12g-cleandotenv
pnpm add 12g-cleandotenv
yarn add 12g-cleandotenv
bun add 12g-cleandotenv
```

## 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.1 |
| Published | 2017-05-26 |
| First published | 2017-05-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | David Spreekmeester |
| Maintainers | aapit |
| Keywords | env, dotenv, 12factor, configuration |

## Links

- npm: https://www.npmjs.com/package/12g-cleandotenv
- Repository: https://github.com/grrr-amsterdam/12g-cleandotenv
- Homepage: https://github.com/grrr-amsterdam/12g-cleandotenv#readme
- Issues: https://github.com/grrr-amsterdam/12g-cleandotenv/issues
- npm.io page: https://npm.io/package/12g-cleandotenv

## Dependencies (1)

- [envfile](https://npm.io/package/envfile.md) ^2.1.1

## 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.0.1 (latest) — 2017-05-26
- 1.0.0 — 2017-05-25

## README

# 12g-cleandotenv

This package enables you to load .env files and return their values as an object.

It cleans out:
* Comment lines
* Single or double quotes from values


## Usage
```node
const dotenv = require('12g-cleandotenv')

dotenv.load()
.then(vars => {
    console.log(vars)
})
```


## Methods
### `.load([path])`
Loads a `.env` file and returns the cleaned up variables in an object, as a Promise.

### `.clean(input)`
Cleans up the content of a `.env` file and returns the variables in an object.
The env file content input can be a `string` or an `object`.

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