Validation
Small size, no deps, best validation experience!
Designed with functional programming in mind
Visit istjs pages
Getting Started
yarn add istjs
ornpm i istjs
- to use version without deps
import * as ist from 'istjs
- to work with uncompiled version you can
import * as ist from 'istjs/lib'
const any string number shape = validators const userModelDetailedSpec = spec const userModelSpec = spec // you can create separate function to validate userconst validateUser = // then use it console// [{ message: 'value is required', args: undefined, value: null, path: [] }] // OR const someUserData = name: 'Igor Shalimov' age: 10 console// [{ message: 'age should be greater or equal than 18', args: 18, value: 10, path: ['age'] }] const adultUserSpec2 = spec // [{ message: 'user is required', args: undefined, value: null, path: [] }]