Timeline-validator
A validator for the Timeline file format.
Node Repository
https://www.npmjs.com/package/@orfeo/timeline-validator
Installation
npm install @orfeo/timeline-validator
Usage
const isValid = require('@orfeo/timeline-validator')
const file = // Load the timeline file.
// Without error reporting.
if (isValid(file)) {
// Do stuff here if valid.
}
// With error reporting.
try {
isValid(file)
} catch (e) {
console.error(e)
process.exit(1)
}
// Do stuff here if valid.
Tests
Command | Description |
---|---|
npm test or npm run test
|
unit tests + coverage + standardx linting |
npm run cover |
unit tests + coverage |
npm run standardx |
standardx linting |
npm run units_with_standardx |
unit tests + standardx linting |
npm run units |
unit tests |
Copyright
Copyright (c) 2019-2020, Pierre-Emmanuel Lévesque
License
MIT