Formats
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
src/mod.tssrc/archive.tssrc/base64.tssrc/cbor.tssrc/csv.tssrc/der.tssrc/glob.tssrc/hex.tssrc/http.tssrc/json5.tssrc/media-types.tssrc/png.tssrc/semver.tssrc/toml.tssrc/ts-literal.tssrc/xml.tssrc/xz.tssrc/yaml.ts
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.