A simple (TypeScript) library with a set of predicates for simple type validation. Eventually, this will have higher-order predicates, and composable functions.
NOTE: This is still under construction, and very experimental. That is, not quite ready for use.
npm install z-validate
import * as validators from 'z-validate'
string(1) // false
number(1) // true
string('abc') // true
number('abc') // false
npm test
: runs the unit testsnpm run test:watch
: runs the unit tests in watch-modenpm start
: alias fornpm run build
npm run build
: builds the librarynpm run precommit
: runs the tests, formatter, etc. as the git precommit hook wouldnpm run prettier
: formats this project's code with 'prettier'
See the contributing guide