JSPM

  • Created
  • Published
  • Downloads 33
  • Score
    100M100P100Q79979F
  • License MIT

A validator format

Package Exports

  • stnl
  • stnl/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stnl) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Stnl

A validator format.

import schema, { type InferSchema } from 'stnl';

export const User = schema({
  props: {
    name: {
      type: 'string',
      minLength: 3
    },
    age: {
      type: 'int'
    },
    pwd: {
      type: 'string',
      minLength: 8,
      maxLength: 16
    }
  }
});

export type User = InferSchema<typeof User>;