npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@daihum/record-formats

v0.1.2

Published

Tree-shakeable adapters for scholarly, archival, library, and cultural record formats.

Readme

@daihum/record-formats

Product-neutral TypeScript adapters for scholarly, archival, library, and cultural record formats.

The package is intentionally modular and tree-shakeable. Consumers import only the format family they need:

import { parseXml } from '@daihum/record-formats/xml';
import { parseEad3Xml } from '@daihum/record-formats/ead3';
import { parseArchiveDescriptionJson } from '@daihum/record-formats/archive-description';
import { parseCollectionJson } from '@daihum/record-formats/collection';

Initial scope

  • Common result and issue contracts for parse, serialize, and validation workflows.
  • XML parse/build helpers backed by fast-xml-parser.
  • EAD3 finding-aid projection helpers adapted from Carrel's initial XML/EAD starter.
  • archive-description.v1, the canonical recursive Archive record, with JSON Schema, DACS profile validation, and explicit EAD3 projection diagnostics.

Future modules can add TEI, MARC/MARCXML, MODS, Dublin Core, EAC-CPF, and crosswalk helpers under explicit subpaths without forcing consumers to import the whole surface.

EAD3 Profile

@daihum/record-formats/ead3 exposes EAD3_ADAPTER_PROFILE and result-level adapterProfile metadata. The current profile is daihum.record-formats.ead3.projection.v0:

  • formatId: ead3
  • formatGeneration: EAD3
  • namespace: http://ead3.archivists.org/schema/
  • schemaVersion / schemaRevision: 1.1.1
  • tagLibraryVersion: 1.1.2
  • validationLevel: projection
  • officialSchemaValidation: false

This means the adapter validates DAIHUM's common finding-aid projection fields and parser/serializer invariants. It does not run official EAD3 RNG, XSD, DTD, or Schematron schema validation yet. Consumers should surface the adapter profile when exporting or importing EAD XML so users can distinguish projection output from full schema validation.

Archive Description

@daihum/record-formats/archive-description owns the canonical Archive-domain record. One archive-description.v1 record represents one finding aid. Its stable node ids and recursive subItems tree keep hierarchy and description in one versioned truth while opaque target refs connect nodes to external material, page, representation, or annotation records.

EAD3 is a bidirectional projection of that record, not the canonical store. Projection results include structured warnings whenever a canonical fact cannot be represented. DACS checks are a separate conformance profile; they do not change the structural parser. The JSON Schema id and revision are exported for storage envelopes and exchange validation.

Cross-tree node-id uniqueness is enforced by the package runtime validator. JSON Schema validates the recursive shape and collection root but cannot express that global uniqueness invariant.

Collection

@daihum/record-formats/collection owns the product-neutral collection.v1 interchange record. It is one identity-bearing snapshot with canonical @daihum/work-metadata titles, identifiers, and provenance plus an ordered array of open typed member references.

import {
  COLLECTION_SCHEMA,
  computeCollectionContentHash,
  parseCollectionJson,
} from '@daihum/record-formats/collection';

Member array order is authoritative. orderKey is optional metadata and is not a uniqueness constraint. Collection nesting uses a member target with kind: 'collection'; the format has no embedded recursive collection and no parent pointer. Target kinds are open strings, with work, collection, material.object, representation, and uri as the documented common values.

The JSON Schema is the portable shape truth. The runtime adds the cross-member invariant that each (target.kind, target.id) pair is unique and, when a contentHash is present, verifies it against the canonical snapshot excluding that self-referential field.

Boundaries

This package owns format adapters and reusable record mappings. Product storage, authority, migration, UI, CLI, import jobs, copy, and downstream persistence remain in Carrel, ONTAL, or other consuming apps.