@orfeo/timeline-validator

A validator for the Timeline file format.


Keywords
Timeline, file, format, validator, Orfeo
License
MIT
Install
npm install @orfeo/timeline-validator@0.1.0

Documentation

Timeline-validator

A validator for the Timeline file format.

http://orfeo.org

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