@configuration-parsing/validator-joi
TypeScript icon, indicating that this package has built-in type declarations

0.8.4-alpha.3 • Public • Published

@configuration-parsing/validator-joi

A joi validator implementing the ValidatableConfiguration interface of @configuration-parsing/core.

Install

npm install @configuration-parsing/validator-joi

Documentation

https://botlfux.github.io/configuration-parsing

Usage

import { joiConfigurationValidator } from '@configuration-parser/validator-joi'
import Joi from 'joi'

const parsedConfiguration = {
    hello: 'world',
    foo: 'bar'
}
const validator = joiConfigurationValidator(Joi.object({
    hello: Joi.string().required(),
    foo: Joi.string().required()
}))
const parsedConfiguration = await parser.validate(parsedConfiguration)

Readme

Keywords

Package Sidebar

Install

npm i @configuration-parsing/validator-joi

Weekly Downloads

3

Version

0.8.4-alpha.3

License

MIT

Unpacked Size

8.27 kB

Total Files

9

Last publish

Collaborators

  • botflx