valid-ts

Simple TypeScript validation library with a declarative interface

Usage no npm install needed!

<script type="module">
  import validTs from 'https://cdn.skypack.dev/valid-ts';
</script>

README

Valid-ts

npm package

It's a very simple validation library. No dependencies. Written in TypeScript. Useful for counstructing well-typed validation functions using a declarative interface. The validation functions are generally supposed to accept any input, ensure its shape during runtime and return typed values.

Installation:

npm install --save valid-ts

Documentation

I want to try out an unusual approach to documentation. I've created a sandbox project in the awesome codesandbox.io:

https://codesandbox.io/s/valid-ts-sandbox-9xxjj

All you need to know to use the library lives in the comments of src/index.ts there.

Example projects

There are two simple example projects to look at. Please check their README.mds to build and test them:

Development

npm install

npm test

Contributing

You're welcome to open a GitHub issue about any problem/question you have. Even a typo in documentation is a good thing to report!