@kth/kth-validation
v1.0.0
Published
Validation utils commonly used in KTH Node projects
Downloads
190
Readme
KTH Validation
Validation utils commonly used in KTH Node projects
Example
const { required } = require('@kth/kth-validation')
function aFunction(name, occupation) {
required({name, occupation})
// .. do magic things
}
// No errors
aFunction('John', 'Painter')
// Error is thrown
aFunction('John')