# yup-config

> Validate configuration objects using yup.

Latest version **1.0.0** (published 2020-05-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install yup-config
pnpm add yup-config
yarn add yup-config
bun add yup-config
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-05-03 |
| First published | 2020-05-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | mattinsler |

## Links

- npm: https://www.npmjs.com/package/yup-config
- Repository: https://github.com/mattinsler/yup-config
- npm.io page: https://npm.io/package/yup-config

## Dependencies (1)

- [yup](https://npm.io/package/yup.md) 0.28.5

## Recent versions

- 1.0.0 (latest) — 2020-05-03

## README

# yup-config

Validate configuration objects using [yup](https://www.npmjs.com/package/yup).

## Usage

```typescript
import * as Config from 'yup-config';

const ConfigSchema = {
  http: Config.object({
    port: Config.number().integer().default(3000),
  }),
};

// load & validate directly from a file
const config = Config.loadConfig('path/to-config.json', ConfigSchema);

// validate from an object
Config.getConfig({ http: { port: 3000 } }, ConfigSchema);
```

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