https://github.com/kth/kth-validation
https://github.com/kth/kth-validation
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/kth/kth-validation
- Owner: KTH
- License: mit
- Created: 2018-11-12T12:20:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-12T13:09:37.000Z (over 7 years ago)
- Last Synced: 2025-02-02T10:47:06.514Z (over 1 year ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KTH Validation
Validation utils commonly used in KTH Node projects
## Example
```javascript
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')
```