@royalschedule/input-verifier
v4.0.1
Published
A script that verifies the structure of the json input to be processed by the scheduling algorithm.
Downloads
4,346
Readme
Input verifier
A script that verifies the structure of the json input to be processed by the scheduling algorithm.
Installation
npm i -S @royalschedule/input-verifier
Usage
import { verify } from '@royalschedule/input-verifier';
// analyze the json input
const result = verify({ ... });
if (result.valid) {
console.log('Valid input 🎉');
} else {
console.log(`${result.errors.length} error(s) found`);
}