@acot/schema-validator
v0.0.19
Published
A simple wrapper module for schema-utils.
Downloads
560
Readme
@acot/schema-validator
A simple wrapper module for schema-utils.
Installation
Install via npm:
$ npm install --save @acot/schema-validator
Usage
T.B.A
import { validate } from '@acot/schema-validator';
type User = {
id: string;
name: string;
age: string;
};
const user = {
id: 'akfgayq12ugb',
name: 'Iron Man',
age: 55,
};
validate<User>(
{
properties: {
id: {
type: 'string',
},
name: {
type: 'string',
},
age: {
type: 'integer',
},
},
additionalProperties: false,
},
user,
{
name: 'User',
base: 'options',
},
);