gedcomkit
v0.1.12
Published
WASM bindings for gedcomkit: an archival-grade GEDCOM library — byte-preserving round-trip, encoding detection, GEDCOM 5.5 through 7.x.
Readme
gedcomkit (npm / WASM)
WASM bindings for gedcomkit, an archival-grade GEDCOM library written in Rust: byte-preserving round-trip, encoding detection and reporting, GEDCOM 5.5 through 7.x. The same source builds target-specific packages for Node, bundlers, or direct browser modules.
import { Gedcom } from "gedcomkit";
const doc = Gedcom.parse(bytes); // Uint8Array in
console.log(doc.encoding); // "Read as ANSEL, declared ANSEL"
for (const person of doc.individuals()) {
console.log(person.names, person.events);
}
console.log(doc.parentsOf("@I3@")); // both directions of the link
doc.setLogicalValue("@I1@", [0], "Ada /Lovelace/");
const out = doc.toBytes(); // untouched lines byte for byteBuild with wasm-pack:
wasm-pack build --target nodejs --release # Node
wasm-pack build --target bundler --release # webpack/vite
wasm-pack build --target web --release # plain <script type=module>Publishing note: wasm-pack names the package after this crate
(gedcomkit-wasm); the release workflow renames it to the npm package
gedcomkit:
cd pkg && npm pkg set name=gedcomkit && npm publishThe Rust core lives at the root of the same repository; this crate is a thin wasm-bindgen layer over its public API, mirroring the Python binding's shape.
License: AGPL-3.0-or-later, the same as the core (see LICENSE).
