Skip to content

SylOpts

options for determining syllabification that may differ according to reading traditions

Properties

allowNoNiqqud?

optional allowNoNiqqud: boolean

allows text with no niqqud to be passed; words with no niqqud or incomplete pointing will not be syllabified

Default Value

false

Example

const text = new Text("בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים", { allowNoNiqqud: true })
text.syllables.map(syl => syl.text);
// [ 'בְּ', 'רֵא', 'שִׁ֖ית', 'בָּרא', 'אלהים' ]
// note 2nd word has incomplete pointing, and 3rd has none

Remarks

results in example displayed in reverse order to mimic Hebrew writing; the rightmost value is the 0 item

Defined in

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


article?

optional article: boolean

determines whether to regard the sheva under the letters ילמ when preceded by the article and with a missing dagesh chazaq as as a sheva na’.

Default Value

true

Example

const usingDefault = new Text("הַיְאֹ֗ר");
usingDefault.syllables.map(syl => syl.text);
// ["הַ", "יְ", "אֹ֗ר"]
const optional = new Text("הַיְאֹ֗ר", { article: false });
optional.syllables.map(syl => syl.text);
// ["הַיְ", "אֹ֗ר"]

Remarks

results in example displayed in reverse order to mimic Hebrew writing; the rightmost value is the 0 item

Defined in

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


holemHaser?

optional holemHaser: "update" | "preserve" | "remove"

how to handle the code point \u{05BA} HOLAM HASER FOR VAV

Options

  • ”update” - converts all holems in a vav + holem sequence where vav is a consonant to HOLAM HASER FOR VAV
  • ”preserve” - leaves the text as is — does not remove HOLAM HASER FOR VAV, but does not update
  • ”remove” - converts all HOLAM HASER FOR VAV to regular holem

Default Value

preserve

Examples

const holemHaser = /\u{05BA}/u;
const str = "עָוֹן" // vav + holem
holemHaser.test(str); // false
const newStr = new Text(updated, { holemHaser: "update" }).text;
holemHaser.test(newStr); // true
const holemHaser = /\u{05BA}/u;
const str = "עָוֹן" // vav + holem
holemHaser.test(str); // false
const newStr = new Text(updated, { holemHaser: "preserve" }).text;
holemHaser.test(newStr); // false
const holemHaser = /\u{05BA}/u;
const str = "עָוֺן" // vav + holem haser
holemHaser.test(str); // true
const newStr = new Text(updated, { holemHaser: "remove" }).text;
holemHaser.test(newStr); // false

Defined in

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


longVowels?

optional longVowels: boolean

determines whether to regard a sheva after a long vowel (excluding waw-shureq, see wawShureq) as a sheva na’, unless preceded by a meteg (see shevaAfterMeteg).

Default Value

true

Example

const usingDefault = new Text("יָדְךָ");
usingDefault.syllables.map(syl => syl.text);
// ["יָ", "דְ", "ךָ"]
const optional = new Text("יָדְךָ", { longVowels: false });
optional.syllables.map(syl => syl.text);
// ["יָדְ", "ךָ"]

Remarks

results in example displayed in reverse order to mimic Hebrew writing; the rightmost value is the 0 item

Defined in

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


qametsQatan?

optional qametsQatan: boolean

converts regular qamets characters to qamets qatan characters where appropriate. The former is a “long-vowel” whereas the latter is a “short-vowel.”

Default Value

true

Example

const qQRegx = /\u{05C7}/u;
const usingDefault = new Text("חָפְנִי֙");
qQRegx.test(default.text);
// true
const optional = new Text("חָפְנִי֙", { qametsQatan: false });
qQRegx.test(optional.text);
// false

Defined in

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


shevaAfterMeteg?

optional shevaAfterMeteg: boolean

determines whether to regard the sheva after a meteg as a sheva na’.

Default Value

true

Example

const usingDefault = new Text("יְדַֽעְיָה");
usingDefault.syllables.map((s) => ({ text: s.text, isClosed: s.isClosed }));
// [
// { text: 'יְ', isClosed: false },
// { text: 'דַֽ', isClosed: false },
// { text: 'עְ', isClosed: false },
// { text: 'יָה', isClosed: false }
// ]
const optional = new Text("יְדַֽעְיָה", { shevaAfterMeteg: false });
optional.syllables.map((s) => ({ text: s.text, isClosed: s.isClosed }));
// [
// { text: 'יְ', isClosed: false },
// { text: 'דַֽעְ', isClosed: true },
// { text: 'יָה', isClosed: false }
// ]

Defined in

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


shevaWithMeteg?

optional shevaWithMeteg: boolean

determines whether to regard a sheva with a meteg as a sheva na’. This is also called a sheva ga’ya.

Default Value

true

Example

const usingDefault = new Text("אַ֥שְֽׁרֵי");
usingusingDefault.syllables.map((s) => ({ text: s.text, isClosed: s.isClosed }));
// [
// { text: 'אַ֥', isClosed: false },
// { text: 'שְֽׁ', isClosed: false },
// { text: 'רֵי', isClosed: false }
// ]
const optional = new Text("אַ֥שְֽׁרֵי", { shevaWithMeteg: false });
optional.syllables.map((s) => ({ text: s.text, isClosed: s.isClosed }));
// [
// { text: 'אַ֥שְֽׁ', isClosed: true },
// { text: 'רֵי', isClosed: false }
// ]

Defined in

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


sqnmlvy?

optional sqnmlvy: boolean

determines whether to regard the sheva under the letters שׁשׂסצנמלוי when preceded by a waw-consecutive with a missing dagesh chazaq as a sheva na’, unless preceded by a meteg (see shevaAfterMeteg).

Default Value

true

Example

const usingDefault = new Text("וַיְצַחֵק֙");
usingDefault.syllables.map(syl => syl.text);
// ["וַ", "יְ", "צַ", "חֵק֙"]
const optional = new Text("וַיְצַחֵק֙", { sqnmlvy: false });
optional.syllables.map(syl => syl.text);
// ["וַיְ", "צַ", "חֵק֙"]

Defined in

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


strict?

optional strict: boolean

whether to syllabify incorrectly pointed text

Default Value

true

Example

const text1 = new Text("לְוּדְרְדַּיְל", { strict: true });
// Error: Syllable לְ should not precede a Cluster with a Shureq in דַּיְלרְדְוּלְ
const text2 = new Text("לְוּדְרְדַּיְל", { strict: false });
text2.syllables.map(syl => syl.text);
// [ 'וּ', 'דְ', 'רְ', 'דַּיְל' ]

Remarks

when false results in syllabification can vary

Defined in

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


wawShureq?

optional wawShureq: boolean

determines whether to regard a sheva after a vav-shureq as vocal, unless preceded by a meteg (see shevaAfterMeteg).

Default Value

true

Example

const usingDefault = new Text("וּלְמַזֵּר");
usingDefault.syllables.map(syl => syl.text);
// "וּ", "לְ", "מַ", "זֵּר"]
const optional = new Text("וּלְמַזֵּר", { wawShureq: false });
optional.syllables.map(syl => syl.text);
// ["וּלְ", "מַ", "זֵּר"]

Remarks

results in example displayed in reverse order to mimic Hebrew writing; the rightmost value is the 0 item

Defined in

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