3.2.3 • Published 4 years ago

@ksyos/koi v3.2.3

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Koi

Some small extensions to Joi (in Typescript).

Install

npm install @ksyos/koi

Browser polyfills

Koi uses the new ES6 features, Promise, Iterable and Map, so you may need to add polyfills to use with older browsers.

Usage

import { Koi } from '@ksyos/koi';

enum Action {
    start = 'start',
    stop = 'stop',
}

Koi.koi().enum(Action).validate('start');
// Validates

Koi.koi().enum(Status).validate('foo');
// Results in error with type 'koi.enum'

Koi.string().elfproef().validate('150668223');
// Validates

Koi.string().elfproef().validate('150668225');
// Results in error with type 'string.elfproef'
3.2.3

4 years ago

3.2.2

4 years ago

3.2.1

4 years ago

3.2.0

4 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago