0.1.0 • Published 3 months ago
texlive-json-schemas v0.1.0
texlive-json-schemas
JSON schema files for TeX Live resources
This package provides JSON schema files and TypeScript type definitions for TeX Live JSON formats, with minor modifications to match the actual output.
Installation
npm install texlive-json-schemas
Usage
import Ajv from 'ajv';
import tlpdb from 'texlive-json-schemas/tlpdb.schema.json';
import type { TLPDB } from 'texlive-json-schemas/types';
const ajv = new Ajv();
const json: unknown = { ... };
if (ajv.validate<TLPDB>(tlpdb, json)) {
// typeof json === TLPDB
}
References
License
0.1.0
3 months ago