Home

Awesome

read-gedcom

A Gedcom file reader written in Typescript. See the documentation.

Features

Installation and Usage

npm install read-gedcom
import { readGedcom } from 'read-gedcom';

const promise = fetch('https://mon.arbre.app/gedcoms/royal92.ged')
  .then(r => r.arrayBuffer())
  .then(readGedcom);

promise.then(gedcom => {
  console.log(gedcom.getHeader().toString());
});

Or, if you simply want to include it as a javascript file, this is also possible:

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/read-gedcom/dist/read-gedcom.min.js"></script>
<script>
    const promise = fetch('https://mon.arbre.app/gedcoms/royal92.ged')
            .then(r => r.arrayBuffer())
            .then(Gedcom.readGedcom);

    promise.then(gedcom => {
        console.log(gedcom.getHeader().toString());
    });
</script>

Documentation

Bug report

A Gedcom file isn't parsed correctly? Please open a ticket!

Also make sure to attach a zipped version of the bogus Gedcom file. If you don't want to publicly share the file, you may send it to this email address; we will create a minimal reproducible example based on what you sent us, which can be safely shared.