IF Commons GitHub

docs/formats/mod

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0006-anyfs-documents FR-012

The codecs of documents that need the file formats of commons: JSON5 and YAML trees. They read what the format holds as a JSON value and write it back in the format's own canonical text; use versioned over one of them for a typed document with a version.

import { yamlTree } from "@intellectual-frontiers/anyfs/docs/formats";
yamlTree.mediaType; // "application/yaml"

Source: commons/anyfs/src/docs/formats/mod.ts

2 of 2 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

json5Treeconst
const json5Tree: Codec<JsonValue>

JSON5 trees: comments and trailing commas are read; the text written is the format's own.

Imported by 11 tests of the run (11 passed, 0 failed): the library's results

yamlTreeconst
const yamlTree: Codec<JsonValue>

YAML trees, in the core schema.

Imported by 11 tests of the run (11 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.