Skip to content
This repository was archived by the owner on Oct 7, 2021. It is now read-only.

Repository files navigation

schema

TypeScript ready object schema validation

NPM VersionTypeScript VersionTested With JestPull RequestsLicenseBuild StatusCoverage StatusPackage QualityDependencies StatusNPM Total DownloadsNPM Monthly DownloadsOpen IssuesClosed Issuesknown vulnerabilitiesGithub StarsGithub Forks

Table of Content

Getting Started

Installation

NPM:

npm i @foxify/schema

Yarn:

yarn add @foxify/schema

Github Packages:

npm i @foxifyjs/schema

Usage

importSchemafrom"@foxify/schema";constschema={username: Schema.string().alphanum().required(),name: Schema.object().keys({first: Schema.string().min(3).required(),last: Schema.string().min(3),}).required(),datetime: Schema.date().default(Date.now),};try{constresult=Schema.object().keys(schema).validate(value);}catch(error){// your error handler}

for more details read the documents

Sponsors

Support this project by becoming a sponsor. Your logo will show up here. [Become a sponsor]

Sponsors

Authors

See also the list of contributors who participated in this project.

Versioning

We use SemVer for versioning. For the versions available, see the releases.

License

This project is licensed under the MIT License - see the LICENSE file for details

About

TypeScript ready object schema validation

Topics

Resources

Code of conduct

Stars

5 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages