Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Parsed values Type Aliases

ValueNameParts: (string | undefined)[] & [string | undefined, string | undefined, string | undefined] & ([string, string, string] | [undefined, string, string] | [string, string, undefined] | [undefined, string, undefined] | [string, undefined, undefined])

Gedcom parser Functions

  • indexTree(rootNode: TreeNodeRoot, noBackwardsReferencesIndex?: boolean, doHideIndex?: boolean, progressCallback?: null | (() => void)): void
  • Reads a Gedcom file and returns it as a tree representation.

    throws

    ErrorParse If the file cannot be interpreted correctly

    Parameters

    Returns TreeNodeRoot

Parsed value converters Functions

  • Converts a parsed Gedcom date to its corresponding JS date (expressed in the Gregorian calendar). The supported calendars are: Gregorian, Julian and French Republican. The Hebrew calendar is not yet supported. Unknown calendars are inherently unsupported. Dual dates will not be converted. BCE dates will be converted assuming the existence of year 0. In any of these cases the returned value will be null. The argument is assumed to be correct, that is of correct format and valid date. This is already guaranteed by parseDate.

    Parameters

    Returns null | Date

Value parsers Functions

  • parseAge(value: null | string): null | ValueAge
  • parseDate(value: null | string): null | ValueDate
  • Parses a Gedcom date. These dates can take many different forms, see ValueDate. The dates are checked for validity with respect to their calendar, except for the Hebrew calendar which will assume all dates to be valid due to a missing implementation. Any unsuccessful parsing or invalid date(s) will result in null.

    Parameters

    • value: null | string

      The value to parse

    Returns null | ValueDate

  • Parses a time of format hours-minutes, optionally containing seconds and even centiseconds information.

    Parameters

    • value: null | string

      The value to parse

    Returns null | ValueExactTime

  • parseLatitude(value: null | string): null | number
  • parseLongitude(value: null | string): null | number
  • parsePlaceParts(value: null | string): null | string[]
  • Parses a place value into parts. It essentially performs a split on the comma character.

    Parameters

    • value: null | string

      The value to parse

    Returns null | string[]

  • parseVersionParts(value: null | string): null | number[] & [number, number, number] & number[] & [number, number]
  • Parses a version value into version number parts.

    Parameters

    • value: null | string

      The value to parse

    Returns null | number[] & [number, number, number] & number[] & [number, number]

Generated using TypeDoc