@acot/schema-validator
TypeScript icon, indicating that this package has built-in type declarations

0.0.19 • Public • Published

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.1984latest
0.0.5-canary.01canary

Version History

VersionDownloads (Last 7 Days)Published
0.0.1984
0.0.181
0.0.171
0.0.162
0.0.151
0.0.142
0.0.131
0.0.121
0.0.1144
0.0.101
0.0.58
0.0.5-canary.01
0.0.41
0.0.4-canary.01
0.0.31
0.0.3-canary.01
0.0.21
0.0.2-canary.11
0.0.2-canary.01
0.0.11

Package Sidebar

Install

npm i @acot/schema-validator

Weekly Downloads

155

Version

0.0.19

License

MIT

Unpacked Size

4.88 kB

Total Files

11

Last publish

Collaborators

  • wadackel