Text is the main exported class.

Constructors

  • Text requires an input string, and has optional arguments for syllabification, which can be read about in the {@page Syllabification} page

    Parameters

    • text: string

      input string

    • options: SylOpts = {}

      syllabification options

    Returns Text

Accessors

  • get chars(): Char[]
  • Returns Char[]

    a one dimensional array of Chars

    const text: Text = new Text("יָד");
    text.chars;
    // [
    // Char { original: "י" },
    // Char { original: "ָ" },
    // Char { original: "ד" }
    // ]
  • get clusters(): Cluster[]
  • Returns Cluster[]

    a one dimensional array of Clusters

    const text: Text = new Text("יָד");
    text.clusters;
    // [
    // Cluster { original: "יָ" },
    // Cluster { original: "ד" }
    // ]
  • get original(): string
  • Returns string

    the original string passed

    const text: Text = new Text("הֲבָרֹות");
    text.original;
    // "הֲבָרֹות"
  • get syllables(): Syllable[]
  • Returns Syllable[]

    a one dimensional array of Syllables

    const text: Text = new Text("הֲבָרֹות");
    text.syllables;
    // [
    // Syllable { original: "הֲ" },
    // Syllable { original: "בָ" },
    // Syllable { original: "רֹות" }
    // ]
  • get text(): string
  • Returns string

    a string that has been decomposed, sequenced, qamets qatan patterns converted to the appropriate unicode character (U+05C7), and holem-waw sequences corrected

    import { Text } from "havarotjs";
    const text: Text = new Text("וַתָּשָׁב");
    text.text;
    // וַתָּשׇׁב
  • get words(): Word[]
  • Returns Word[]

    a one dimensional array of Words

    const text: Text = new Text("הֲבָרֹות");
    text.words;
    // [Word { original: "הֲבָרֹות" }]

Generated using TypeDoc