@omnist-dev/omnist
    Preparing search index...

    @omnist-dev/omnist

    omnist (TypeScript)

    test docs npm License: Apache-2.0

    TypeScript port of omnist -- one canonical data model for JSON, YAML, TOML, XML, and its own native OML (Omnist Markup Language). See the upstream Python project for the full design rationale; this repo mirrors its module boundaries and public API (camelCase names of the same functions).

    Docs: https://ts.omnist.dev/ (start at Quickstart).

    Status: fully implemented -- library, CLI, and fuzz/oracle test suite are complete and at 100% coverage (issues #1-#11). Published to npm as @omnist-dev/omnist under the alpha dist-tag:

    npm install @omnist-dev/omnist@alpha
    

    Track progress via the issue tracker.

    Same model as upstream, ported directly from its formal spec:

    • A Document is an ordered list of labeled edges (not a map) -- arrays are repeated labels.
    • A Schema is record definitions (closed, named fields with cardinality), where a field's type is exactly one scalar (string/integer/number/boolean/date/time/datetime, optionally nullable), a Ref to a named record, or any.

    See the spec's Schema Model chapter for the full formal definition this port implements against, or the quickstart for the shortest possible tour.

    Reading untrusted input is bounded: nesting depth 200, 1,000,000 nodes, 4,300 integer digits (each configurable per call: readJson(text, { maxDepth, maxNodes, maxIntDigits }); a refusal is document.limit.depth, document.limit.nodes or document.limit.int-digits), and, for YAML, an alias expansion factor of 50 (spec D-18; configurable with readYaml(text, { maxAliasExpansion }), rejected input reports document.limit.alias-expansion) and an expanded size of 1,000,000 value slots (spec D-22; readYaml(text, { maxExpandedSlots }), rejected input reports document.limit.expanded-size; it applies only to a document that contains an alias or a merge key). A merge value that is not a mapping or a sequence of mappings is a parse.codec-syntax error. See YAML.

    npm install
    npm run typecheck
    npm run lint
    npm test
    npm run test:coverage
    npm run docs:dev # live-reload docs site at http://localhost:5173
    npm run docs:build # static build to docs/.vitepress/dist

    Apache-2.0 -- see LICENSE and NOTICE.