Skip to content

Text

Text is the main exported class.

Constructors

new Text()

new Text(text, options?): Text

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

Parameters

ParameterTypeDescription
textstringinput string
options?SylOptssyllabification options

Returns

Text

Defined in

node_modules/havarotjs/dist/types/text.d.ts:242

Accessors

chars

get chars(): Char[]

Returns

Char[]

a one dimensional array of Chars

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

Defined in

node_modules/havarotjs/dist/types/text.d.ts:319


clusters

get clusters(): Cluster[]

Returns

Cluster[]

a one dimensional array of Clusters

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

Defined in

node_modules/havarotjs/dist/types/text.d.ts:305


original

get original(): string

Returns

string

the original string passed

const text: Text = new Text("הֲבָרֹות");
text.original;
// "הֲבָרֹות"

Defined in

node_modules/havarotjs/dist/types/text.d.ts:257


syllables

get syllables(): Syllable[]

Returns

Syllable[]

a one dimensional array of Syllables

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

Defined in

node_modules/havarotjs/dist/types/text.d.ts:292


text

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;
// וַתָּשׇׁב

Defined in

node_modules/havarotjs/dist/types/text.d.ts:268


words

get words(): Word[]

Returns

Word[]

a one dimensional array of Words

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

Defined in

node_modules/havarotjs/dist/types/text.d.ts:278