# env-ts-conf

> A simple typed library to load configuration from env files

Latest version **1.0.1** (published 2020-08-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install env-ts-conf
pnpm add env-ts-conf
yarn add env-ts-conf
bun add env-ts-conf
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-08-01 |
| First published | 2020-07-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 71.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | ludusrusso |
| Maintainers | ludusrusso |
| Keywords | env, configuration, types |

## Links

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

## 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) — 2020-08-01
- 1.0.0 — 2020-07-28

## README

# env-ts-conf

## Typed environment configuration for node

**env-ts-conf** is a simple library that provides types and autocompletion for configuration loaded from environment file.

You start from a configuration object describing the environment variabiles you want to load

```ts
const config = getConfigs({
  test: {
    type: 'string',
    variableName: 'TEST_VARIABLE',
    default: 'test',
  },
  myNumber: {
    type: 'number',
    variableName: 'MY_NUMBER',
    default: 10,
  },
});
```

and you get back a typed object:

```ts
const conf: {
  test: string;
  myNumber: number;
};
```

![Example image](./img.png)

## Features

- typed configuration and autocompletion!
- crashes if env variable is not found!

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