0.9.10 • Published 6 years ago

typeguard-composer v0.9.10

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

typeguard-composer

CI codecov

Performant and composable type guards for runtime data validation.

import { validate } from 'typeguard-composer';
import { isString, isNumber } from 'typeguard-composer/validators';
import { AddressSchema } from './address.schema';

const PersonSchema = {
  name: isString,
  age: isNumber,
  addresses: [AddressSchema]
}

validate(PersonSchema, { name: 'Test Elek', age: 18, addresses: []});

Install

To install run npm i typeguard-composer.

Built in validators

This libary inculdes validators for the basic primitives only. You can (soon) use the typeguard-composer-validators package to match against various other types.

License

MIT Licensed

0.9.10

6 years ago

0.9.9

9 years ago

0.9.8

9 years ago

0.9.7

9 years ago

0.9.6

9 years ago

0.9.4

9 years ago

0.9.3

9 years ago

0.9.2

9 years ago

0.9.1

9 years ago

0.9.0

9 years ago