0.1.0 • Published 5 years ago

@orfeo/timeline-validator v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

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

CommandDescription
npm test or npm run testunit tests + coverage + standardx linting
npm run coverunit tests + coverage
npm run standardxstandardx linting
npm run units_with_standardxunit tests + standardx linting
npm run unitsunit tests

Copyright

Copyright (c) 2019-2020, Pierre-Emmanuel Lévesque

License

MIT