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:60
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:80
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
update
const holemHaser = /\u{05BA}/u;const str = "עָוֹן" // vav + holemholemHaser.test(str); // falseconst newStr = new Text(updated, { holemHaser: "update" }).text;holemHaser.test(newStr); // true
preserve
const holemHaser = /\u{05BA}/u;const str = "עָוֹן" // vav + holemholemHaser.test(str); // falseconst newStr = new Text(updated, { holemHaser: "preserve" }).text;holemHaser.test(newStr); // false
remove
const holemHaser = /\u{05BA}/u;const str = "עָוֺן" // vav + holem haserholemHaser.test(str); // trueconst newStr = new Text(updated, { holemHaser: "remove" }).text;holemHaser.test(newStr); // false
Defined in
node_modules/havarotjs/dist/types/text.d.ts:122
ketivQeres?
optional
ketivQeres:KetivQere
[]
An array of KetivQere objects for mimicing the Ketiv and Qere system found in manuscripts and texts
Default Value
undefined
Examples
default
const text = new Text("הִ֑וא", { ketivQeres: [ { input: "הִוא", output: "הִיא" } ]});console.log(text.words[0].text);// הִיא
Using optional syntax
const text = new Text("הִ֑וא", { ketivQeres: [ { ketiv: "הִוא", qere: "הִיא" } ]});console.log(text.words[0].text);// הִיא
captureTaamim
set to true
const text = new Text("הִ֑וא", { ketivQeres: [ { input: "הִוא", output: "הִיא", captureTaamim: true } ]});console.log(text.words[0].text);// הִ֑יא
ignoreTaamim
set to false
const text = new Text("הִ֑וא", { ketivQeres: [ { input: "הִ֯וא", output: "הִיא", ignoreTaamim: false } ]});console.log(text.words[0].text);// הִ֯וא// does not match because the input taam is not the same as the Text taam
input
as a regular expression, and output
as a callback
const text = new Text("וַיָּבִיאּוּ", { ketivQeres: [ { input: /אּ/, output: (word, input) => word.replace(input, "א") } ]});console.log(text.words[0].text);// וַיָּבִיאוּ
Remarks
KetivQere objects allow for flexible handling of words, mimicking how ketiv/qeres are used in biblical manuscripts
Defined in
node_modules/havarotjs/dist/types/text.d.ts:209
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:229
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:247
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:273
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:297
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:314
strict?
optional
strict:boolean
Determines 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:333
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:353