edtf-wasm 0.2.0

WebAssembly bindings for edtf-core: EDTF (ISO 8601-2) validation for JavaScript.
Documentation

WebAssembly bindings for [edtf_core] — the same validator the database runs, compiled for JavaScript. The app imports this in place of edtf.js.

Exported API (JS names):

  • isValid(input)boolean
  • level(input)0 | 1 | 2 | -1 (-1 = invalid)
  • canonical(input)string | undefined (spec-preferred form)
  • parse(input) → JSON string of a [Summary] or undefined
  • relation(a, b) → JSON string of a [RelationSummary] or undefined