validate-params
A small parameter validation library
The purpose of this library is to easily check that the contract of your functions are not violated; and if they are, to allow you to gracefully handle the situation (provide useful error messages).
Basic examples
var Validator = ; // validating a single argument{ Validatorassert; //Then do something with the callback later //At this point we can be sure that callback is a function} ; //throws Error('Expected type "function" but it was type "number"') // validating an argument object{ Validatorassert; //...} ;
Documentation
To learn more checkout the documentation page