# @fidilen/env

> Easy-to-use configuration system for environment variables. Acts as subtitute for .env files if you don't want to update .env from time to time, or if you need to expose variables, but not .env.

Latest version **2.2.0** (published 2023-12-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @fidilen/env
pnpm add @fidilen/env
yarn add @fidilen/env
bun add @fidilen/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.0 |
| Published | 2023-12-15 |
| First published | 2023-10-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | fidilen.com |
| Maintainers | fidilen |

## Links

- npm: https://www.npmjs.com/package/@fidilen/env
- npm.io page: https://npm.io/package/@fidilen/env

## Recent versions

- 2.2.0 (latest) — 2023-12-15
- 2.1.0 — 2023-11-09
- 2.0.0 — 2023-10-04

## README

# config
Easy-to-use configuration system for environment variables.
The main goal of this is to save projects from using `process.env` while keeping the convenience of referencing the variables across a project.


## Setup
- New folder `env` in the root directory.
- New `env.json` under the `env` folder.
- Set `ENV` as either `dev`, `prod`, or any other keyword.
  - Create a new JSON file in the same directory with suffix after the keyword (eg. `env-dev.json`)
  - Otherwise, default config is the `env.json`

> Note:
> You should add `env` in your `.gitignore` if you don't want to have these included in your commits.

### Examples
- `env.json`
```json
{
    "ENV": "dev"
}
```

- `env-dev.json`
```json
{
    "VARIABLE_NAME": "123"
}
```


## Usage
```js
const config = require('@fidilen/config');

console.log(config.VARIABLE_NAME);
```

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