parse-gedcom
Version:
a simple and readable gedcom parser
21 lines (20 loc) • 637 B
TypeScript
import { FORMAL_NAMES } from "./formal_names";
declare type TagName = keyof typeof FORMAL_NAMES;
export declare type Line = {
level: number;
tag: TagName;
xref_id?: string;
pointer?: string;
value?: string;
};
/**
* Lowest-level API to parse-gedcom: parses a single line
* of GEDCOM into its constituent tag, level, xref_id,
* and so on. It's unlikely that external applications would use this API.
* Instead they will more often use `parse`.
*
* @param buf - One line of GEDCOM data as a string
* @returns a line object.
*/
export declare function tokenize(buf: string): Line;
export {};