UNPKG

parse-gedcom

Version:

a simple and readable gedcom parser

17 lines (16 loc) 657 B
import { Parent } from "unist"; /** * Parse a string of GEDCOM data into an unist-compatible * abstract syntax tree. This is the core function for transforming * GEDCOM into JSON data that captures all of its detail, but * for practical usage you may also want to run `compact` * on the generated syntax tree to compress attributes. * * **Note**: the AST format uses 'children' to indicate the children * of abstract syntax tree nodes, but these are not equivalent to * parent/child relationships in family data. * * @param input - GEDCOM data as a string * @returns ast */ export declare function parse(input: string): Parent;