IF Commons GitHub

Formats

Quality: 92 tests: 92 passed, 0 failed, 0 skipped, 21 of 23 requirements proved, 0 open issues, 0 open tickets. The tests and issues of the library

Formats, the file and wire formats of Intellectual Frontiers Commons, read and written in pure code with no outside package (its specification 0001-formats): JSON5, YAML, TOML, XML, CSV, base64 and hexadecimal, ASN.1 DER (as der), CBOR (as cbor), archives (tar, gzip, zip), PNG and ICO pictures (as png), TypeScript literals, glob patterns (as glob), semantic versions, media types and HTTP headers. It depends on core alone, names no host global and runs wherever ECMAScript does: Bun, Node 26, a browser, a Worker.

Entry points

Modules

Examples

import { parseYaml, toJson5 } from "@intellectual-frontiers/formats";
const doc = parseYaml("name: commons\nlevels: [L0, L1]\n");
doc.kind === "ok" ? toJson5(doc.value) : doc.error;

Limits

What the modules of this area do not do, or do only in part, as each module's @limits says.

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