Class TrioReader

Reads Trio formatted text.

// Read a trio file's dicts...
for (let dict of TrioReader.readAllDicts(trioStr)) {
// Do something with the dict.
}

// Read a trio file as a grid...
const gridWithSites = TrioReader.readGrid(trioStr).filter('site')

// Alternatively use the reader as an iterator...
for (let dict of new TrioReader(trioStr)) {
// Do something with the dict.
}

Hierarchy

  • TrioReader

Implements

Constructors

Methods

  • Iterate the reader's dicts.

    Returns Iterator<HDict, any, undefined>

  • Read the next dict or return undefined if at the end of the stream.

    Returns undefined | HDict

    The next dict.

    Throws

    Error if there's a problem reading the trio file.

  • Read a trio file and return an array of dicts.

    Parameters

    • input: string

      The trio input.

    Returns HDict[]

    An array of dicts.

Generated using TypeDoc