0.0.19 • Published 2 years ago

@acot/schema-validator v0.0.19

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@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',
  },
);
0.0.19

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.5-canary.0

3 years ago

0.0.5

3 years ago

0.0.4-canary.0

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.3-canary.0

3 years ago

0.0.2

3 years ago

0.0.2-canary.1

4 years ago

0.0.2-canary.0

4 years ago

0.0.1

4 years ago