@hebcal/leyning 8.0.0 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -1
- package/dist/bundle.js +84 -74
- package/dist/bundle.min.js +2 -2
- package/dist/index.js +84 -74
- package/dist/index.mjs +84 -75
- package/leyning.d.ts +15 -6
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/leyning v8.
|
|
1
|
+
/*! @hebcal/leyning v8.1.0 */
|
|
2
2
|
import { flags, months, HDate, HebrewCalendar, Locale, ParshaEvent, Event } from '@hebcal/core';
|
|
3
3
|
|
|
4
4
|
const Genesis=[0,31,25,24,26,32,22,24,22,29,32,32,20,18,24,21,16,27,33,38,18,34,24,20,67,34,35,46,22,35,43,54,33,20,31,29,43,36,30,23,23,57,38,34,34,28,34,31,22,33,26];const Exodus=[0,22,25,22,31,23,30,29,28,35,29,10,51,22,31,27,36,16,27,25,26,37,30,33,18,40,37,21,43,46,38,18,35,23,35,35,38,29,31,43,38];const Leviticus=[0,17,16,17,35,26,23,38,36,24,20,47,8,59,57,33,34,16,30,37,27,24,33,44,23,55,46,34];const Numbers=[0,54,34,51,49,31,27,89,26,23,36,35,16,33,45,41,35,28,32,22,29,35,41,30,25,19,65,23,31,39,17,54,42,56,29,34,13];const Deuteronomy=[0,46,37,29,49,30,25,26,20,29,22,32,31,19,29,23,22,20,22,21,20,23,29,26,22,19,19,26,69,28,20,30,52,29,12];const Joshua=[0,18,24,17,24,15,27,26,35,27,43,23,24,33,15,63,10,18,28,51,9,45,34,16,33];const Judges=[0,36,23,31,24,31,40,25,35,57,18,40,15,25,20,20,31,13,31,30,48,25];const Ruth=[0,22,23,18,22];const Isaiah=[0,31,22,26,6,30,13,25,23,20,34,16,6,22,32,9,14,14,7,25,6,17,25,18,23,12,21,13,29,24,33,9,20,24,17,10,22,38,22,8,31,29,25,28,28,25,13,15,22,26,11,23,15,12,17,13,12,21,14,21,22,11,12,19,11,25,24];const Jeremiah=[0,19,37,25,31,31,30,34,23,25,25,23,17,27,22,21,21,27,23,15,18,14,30,40,10,38,24,22,17,32,24,40,44,26,22,19,32,21,28,18,16,18,22,13,30,5,28,7,47,39,46,64,34];const Lamentations=[0,22,22,66,22,22];const Baruch=[0,22,35,38,37,9,72];const Esther=[0,22,23,15,17,14,14,10,17,32,3];const Ecclesiastes=[0,18,26,22,17,19,12,29,17,18,20,10,14];const Ezekiel=[0,28,10,27,17,17,14,27,18,11,22,25,28,23,23,8,63,24,32,14,44,37,31,49,27,17,21,36,26,21,26,18,32,33,31,15,38,28,23,29,49,26,20,27,31,25,24,23,35];const Daniel=[0,21,49,100,34,30,29,28,27,27,21,45,13,64,42];const Hosea=[0,9,25,5,19,15,11,16,14,17,15,11,15,15,10];const Joel=[0,20,27,5,21];const Amos=[0,15,16,15,13,27,14,17,14,15];const Obadiah=[0,21];const Jonah=[0,16,11,10,11];const Micah=[0,16,13,12,14,14,16,20];const Nachum=[0,14,14,19];const Habakkuk=[0,17,20,19];const Zephaniah=[0,18,15,20];const Haggai=[0,15,23];const Zechariah=[0,17,17,10,14,11,15,14,23,17,12,17,14,9,21];const Malachi=[0,14,17,24];var numverses = {Genesis:Genesis,Exodus:Exodus,Leviticus:Leviticus,Numbers:Numbers,Deuteronomy:Deuteronomy,Joshua:Joshua,Judges:Judges,Ruth:Ruth,"I Samuel":[0,28,36,21,22,12,21,17,22,27,27,15,25,23,52,35,23,58,30,24,42,16,23,28,23,43,25,12,25,11,31,13],"II Samuel":[0,27,32,39,12,25,23,29,18,13,19,27,31,39,33,37,23,29,32,44,26,22,51,39,25],"I Kings":[0,53,46,28,20,32,38,51,66,28,29,43,33,34,31,34,34,24,46,21,43,29,54],"II Kings":[0,18,25,27,44,27,33,20,29,37,36,20,22,25,29,38,20,41,37,37,21,26,20,37,20,30],Isaiah:Isaiah,Jeremiah:Jeremiah,Lamentations:Lamentations,Baruch:Baruch,Esther:Esther,Ecclesiastes:Ecclesiastes,"Song of Songs":[0,17,17,11,16,16,12,14,14],Ezekiel:Ezekiel,Daniel:Daniel,Hosea:Hosea,Joel:Joel,Amos:Amos,Obadiah:Obadiah,Jonah:Jonah,Micah:Micah,Nachum:Nachum,Habakkuk:Habakkuk,Zephaniah:Zephaniah,Haggai:Haggai,Zechariah:Zechariah,Malachi:Malachi};
|
|
@@ -261,11 +261,11 @@ function lookupFestival(holiday) {
|
|
|
261
261
|
}
|
|
262
262
|
const result = src.fullkriyah ? clone(src) : src;
|
|
263
263
|
if (result.fullkriyah) {
|
|
264
|
-
Object.values(result.fullkriyah)
|
|
264
|
+
for (const aliyah of Object.values(result.fullkriyah)) {
|
|
265
265
|
if (typeof aliyah.k === 'number') {
|
|
266
266
|
aliyah.k = BOOK[aliyah.k];
|
|
267
267
|
}
|
|
268
|
-
}
|
|
268
|
+
}
|
|
269
269
|
}
|
|
270
270
|
if (src.note) {
|
|
271
271
|
result.note = src.note;
|
|
@@ -308,32 +308,23 @@ function getLeyningKeyForEvent(ev, il = false) {
|
|
|
308
308
|
}
|
|
309
309
|
return desc;
|
|
310
310
|
}
|
|
311
|
+
const cholHaMoedDay = ev.cholHaMoedDay;
|
|
311
312
|
if (day == 1 && month === months.TISHREI) {
|
|
312
313
|
return isShabbat ? 'Rosh Hashana I (on Shabbat)' : 'Rosh Hashana I';
|
|
313
|
-
} else if (
|
|
314
|
+
} else if (cholHaMoedDay) {
|
|
314
315
|
// Sukkot or Pesach
|
|
315
316
|
if (isShabbat) {
|
|
316
317
|
return holiday + ' Shabbat Chol ha-Moed';
|
|
317
318
|
} else if (desc == 'Sukkot VII (Hoshana Raba)') {
|
|
318
319
|
return 'Sukkot Final Day (Hoshana Raba)';
|
|
319
320
|
}
|
|
320
|
-
if (isPesach &&
|
|
321
|
+
if (isPesach && cholHaMoedDay) {
|
|
321
322
|
if (dow === 0 && desc === 'Pesach IV (CH\'\'M)') {
|
|
322
323
|
return 'Pesach Chol ha-Moed Day 2 on Sunday';
|
|
323
324
|
} else if (dow === 1 && desc === 'Pesach V (CH\'\'M)') {
|
|
324
325
|
return 'Pesach Chol ha-Moed Day 3 on Monday';
|
|
325
326
|
}
|
|
326
327
|
}
|
|
327
|
-
// If Shabbat falls on the third day of Chol ha-Moed Pesach,
|
|
328
|
-
// the readings for the third, fourth, and fifth days are moved ahead
|
|
329
|
-
let cholHaMoedDay = ev.cholHaMoedDay;
|
|
330
|
-
if (isPesach && cholHaMoedDay >= 3) {
|
|
331
|
-
if (dow == 0 && cholHaMoedDay == 4) {
|
|
332
|
-
cholHaMoedDay = 3;
|
|
333
|
-
} else if (dow == 1 && cholHaMoedDay == 5) {
|
|
334
|
-
cholHaMoedDay = 4;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
328
|
return `${holiday} Chol ha-Moed Day ${cholHaMoedDay}`;
|
|
338
329
|
} else if (ev.chanukahDay) {
|
|
339
330
|
if (isShabbat && isRoshChodesh) {
|
|
@@ -389,7 +380,6 @@ function getLeyningKeyForEvent(ev, il = false) {
|
|
|
389
380
|
return 'Chanukah Day 7 (on Rosh Chodesh)'; // 1st of Tevet
|
|
390
381
|
}
|
|
391
382
|
}
|
|
392
|
-
|
|
393
383
|
if (isRoshChodesh) {
|
|
394
384
|
return desc;
|
|
395
385
|
}
|
|
@@ -491,14 +481,16 @@ function specialReadings2(parsha, hd, il, aliyot) {
|
|
|
491
481
|
if (special.fullkriyah) {
|
|
492
482
|
const aliyotMap = clone(aliyot);
|
|
493
483
|
mergeAliyotWithSpecial(aliyotMap, special.fullkriyah);
|
|
494
|
-
Object.keys(special.fullkriyah)
|
|
484
|
+
for (const num of Object.keys(special.fullkriyah)) {
|
|
485
|
+
reason[num] = key;
|
|
486
|
+
}
|
|
495
487
|
aliyot = aliyotMap;
|
|
496
488
|
}
|
|
497
489
|
}
|
|
498
490
|
const parshaName = parshaToString(parsha);
|
|
499
491
|
const events0 = HebrewCalendar.getHolidaysOnDate(hd, il) || [];
|
|
500
492
|
const events = events0.filter(ev => !(ev.getFlags() & flags.ROSH_CHODESH));
|
|
501
|
-
|
|
493
|
+
for (const ev of events) {
|
|
502
494
|
if (ev.getDesc() === 'Shabbat Shuva') {
|
|
503
495
|
handleSpecial(`Shabbat Shuva (with ${parshaName})`);
|
|
504
496
|
} else {
|
|
@@ -507,7 +499,7 @@ function specialReadings2(parsha, hd, il, aliyot) {
|
|
|
507
499
|
handleSpecial(key);
|
|
508
500
|
}
|
|
509
501
|
}
|
|
510
|
-
}
|
|
502
|
+
}
|
|
511
503
|
if (!haft) {
|
|
512
504
|
const day = hd.getDate();
|
|
513
505
|
if (parshaName === 'Pinchas' && day > 17) {
|
|
@@ -665,7 +657,7 @@ const Bereshit={num:1,hebrew:"בְּרֵאשִׁית",book:1,haft:{k:"Isaiah",b:
|
|
|
665
657
|
* @property {LeyningNames} name
|
|
666
658
|
* @property {string[]} [parsha] - An array of either 1 (regular) or 2 (doubled parsha).
|
|
667
659
|
* `undefined` for holiday readings
|
|
668
|
-
* @property {number} [parshaNum] - 1 for Bereshit, 2 for Noach, etc. `undefined` for holiday readings
|
|
660
|
+
* @property {number|number[]} [parshaNum] - 1 for Bereshit, 2 for Noach, etc. `undefined` for holiday readings
|
|
669
661
|
* @property {string} summary - Such as `Genesis 1:1 - 6:8`
|
|
670
662
|
* @property {Aliyah|Aliyah[]} haft - Haftarah object(s)
|
|
671
663
|
* @property {string} haftara - Haftarah, such as `Isaiah 42:5 – 43:11`
|
|
@@ -699,6 +691,19 @@ function getHaftaraKey(parsha) {
|
|
|
699
691
|
}
|
|
700
692
|
}
|
|
701
693
|
|
|
694
|
+
/**
|
|
695
|
+
* Transliterated English and Hebrew names of this parsha
|
|
696
|
+
* @param {string|string[]} parsha untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei']
|
|
697
|
+
* @return {LeyningNames}
|
|
698
|
+
*/
|
|
699
|
+
function makeLeyningNames(parsha) {
|
|
700
|
+
const name = parshaToString(parsha);
|
|
701
|
+
return {
|
|
702
|
+
en: name,
|
|
703
|
+
he: parsha.map(s => Locale.lookupTranslation(s, 'he')).join('־')
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
|
|
702
707
|
/**
|
|
703
708
|
* Looks up regular leyning for a weekly parsha with no special readings
|
|
704
709
|
* @private
|
|
@@ -709,26 +714,22 @@ function getLeyningForParshaShabbatOnly(parsha) {
|
|
|
709
714
|
const raw = lookupParsha(parsha);
|
|
710
715
|
const fullkriyah = {};
|
|
711
716
|
const book = BOOK[raw.book];
|
|
712
|
-
Object.
|
|
713
|
-
const
|
|
714
|
-
const reading = {
|
|
717
|
+
for (const [num, src] of Object.entries(raw.fullkriyah)) {
|
|
718
|
+
const aliyah = {
|
|
715
719
|
k: book,
|
|
716
720
|
b: src[0],
|
|
717
721
|
e: src[1]
|
|
718
722
|
};
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
723
|
+
calculateNumVerses(aliyah);
|
|
724
|
+
fullkriyah[num] = aliyah;
|
|
725
|
+
}
|
|
722
726
|
const name = parshaToString(parsha);
|
|
723
727
|
const parshaNameArray = raw.combined ? [raw.p1, raw.p2] : [name];
|
|
724
728
|
const parts = makeLeyningParts(fullkriyah);
|
|
725
729
|
const summary = makeSummaryFromParts(parts);
|
|
726
730
|
/** @type {Leyning} */
|
|
727
731
|
const result = {
|
|
728
|
-
name:
|
|
729
|
-
en: name,
|
|
730
|
-
he: parshaNameArray.map(s => Locale.lookupTranslation(s, 'he')).join('־')
|
|
731
|
-
},
|
|
732
|
+
name: makeLeyningNames(parshaNameArray),
|
|
732
733
|
parsha: parshaNameArray,
|
|
733
734
|
parshaNum: raw.num,
|
|
734
735
|
summary,
|
|
@@ -830,18 +831,20 @@ function getLeyningForParshaHaShavua(ev, il = false) {
|
|
|
830
831
|
const reasons = Object.keys(reason);
|
|
831
832
|
if (reasons.length !== 0) {
|
|
832
833
|
result.reason = reason;
|
|
833
|
-
|
|
834
|
+
for (const num of reasons) {
|
|
834
835
|
if (num === 'haftara' || num === 'sephardic') {
|
|
835
836
|
const haftObj = result[num === 'haftara' ? 'haft' : 'seph'];
|
|
836
837
|
const hafts = Array.isArray(haftObj) ? haftObj : [haftObj];
|
|
837
|
-
|
|
838
|
+
for (const haft of hafts) {
|
|
839
|
+
haft.reason = reason[num];
|
|
840
|
+
}
|
|
838
841
|
} else {
|
|
839
842
|
const aliyah = result.fullkriyah[num];
|
|
840
843
|
if (typeof aliyah === 'object') {
|
|
841
844
|
aliyah.reason = reason[num];
|
|
842
845
|
}
|
|
843
846
|
}
|
|
844
|
-
}
|
|
847
|
+
}
|
|
845
848
|
}
|
|
846
849
|
return result;
|
|
847
850
|
}
|
|
@@ -886,6 +889,18 @@ function findParshaHaShavua(saturday, il) {
|
|
|
886
889
|
if (!parsha.chag) {
|
|
887
890
|
return parsha;
|
|
888
891
|
}
|
|
892
|
+
// Special case between YK and Simchat Torah
|
|
893
|
+
if (saturday.getMonth() === months.TISHREI) {
|
|
894
|
+
const dd = saturday.getDate();
|
|
895
|
+
const simchatTorah = il ? 22 : 23;
|
|
896
|
+
if (dd > 10 && dd <= simchatTorah) {
|
|
897
|
+
return {
|
|
898
|
+
parsha: ['Vezot Haberakhah'],
|
|
899
|
+
chag: false,
|
|
900
|
+
num: 54
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
}
|
|
889
904
|
// Search for next regular parsha, which could even spill into next year
|
|
890
905
|
const endOfYear = new HDate(1, months.TISHREI, hyear + 1).abs() - 1;
|
|
891
906
|
const endAbs = endOfYear + 30;
|
|
@@ -920,48 +935,44 @@ function findParshaHaShavua(saturday, il) {
|
|
|
920
935
|
*/
|
|
921
936
|
function getLeyningOnDate(hdate, il, wantarray = false) {
|
|
922
937
|
const dow = hdate.getDay();
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
938
|
+
if (dow === 6) {
|
|
939
|
+
const hyear = hdate.getFullYear();
|
|
940
|
+
const sedra = HebrewCalendar.getSedra(hyear, il);
|
|
941
|
+
const parsha = sedra.lookup(hdate);
|
|
942
|
+
if (!parsha.chag) {
|
|
943
|
+
const parshaEvent = new ParshaEvent(hdate, parsha.parsha, il);
|
|
944
|
+
const reading = getLeyningForParshaHaShavua(parshaEvent, il);
|
|
945
|
+
return wantarray ? [reading] : reading;
|
|
946
|
+
}
|
|
930
947
|
}
|
|
931
948
|
const events = HebrewCalendar.getHolidaysOnDate(hdate, il) || [];
|
|
932
949
|
const arr = [];
|
|
933
|
-
|
|
934
|
-
|
|
950
|
+
let hasFullKriyah = false;
|
|
951
|
+
for (const ev of events) {
|
|
935
952
|
const reading = getLeyningForHoliday(ev, il);
|
|
936
953
|
if (reading) {
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
return reading;
|
|
954
|
+
arr.push(reading);
|
|
955
|
+
if (reading.fullkriyah) {
|
|
956
|
+
hasFullKriyah = true;
|
|
957
|
+
}
|
|
958
|
+
const mincha = getMincha(ev, il);
|
|
959
|
+
if (mincha) {
|
|
960
|
+
arr.push(mincha);
|
|
945
961
|
}
|
|
946
962
|
}
|
|
947
963
|
}
|
|
948
|
-
if (
|
|
949
|
-
return arr;
|
|
950
|
-
}
|
|
951
|
-
if (dow === 1 || dow === 4) {
|
|
964
|
+
if (!hasFullKriyah && (dow === 1 || dow === 4)) {
|
|
952
965
|
const saturday = hdate.onOrAfter(6);
|
|
953
|
-
const
|
|
954
|
-
const reading =
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
weekday: reading.weekday
|
|
966
|
+
const parsha = findParshaHaShavua(saturday);
|
|
967
|
+
const reading = {
|
|
968
|
+
name: makeLeyningNames(parsha.parsha),
|
|
969
|
+
parsha: parsha.parsha,
|
|
970
|
+
parshaNum: parsha.num,
|
|
971
|
+
weekday: getWeekdayReading(parsha.parsha)
|
|
960
972
|
};
|
|
961
|
-
|
|
973
|
+
arr.unshift(reading);
|
|
962
974
|
}
|
|
963
|
-
|
|
964
|
-
return wantarray ? [] : undefined;
|
|
975
|
+
return wantarray ? arr : arr[0];
|
|
965
976
|
}
|
|
966
977
|
const minchaSuffix = ' (Mincha)';
|
|
967
978
|
|
|
@@ -1033,11 +1044,11 @@ function writeFullKriyahCsv(stream, hyear, il) {
|
|
|
1033
1044
|
const events = events0.filter(ev => ev.getDesc() !== 'Rosh Chodesh Tevet');
|
|
1034
1045
|
const parshaDates = getParshaDates(events);
|
|
1035
1046
|
stream.write('"Date","Parashah","Aliyah","Reading","Verses"\r\n');
|
|
1036
|
-
|
|
1047
|
+
for (const ev of events) {
|
|
1037
1048
|
if (ev.getFlags() === flags.PARSHA_HASHAVUA || !parshaDates[ev.getDate().toString()]) {
|
|
1038
1049
|
writeFullKriyahEvent(stream, ev, il);
|
|
1039
1050
|
}
|
|
1040
|
-
}
|
|
1051
|
+
}
|
|
1041
1052
|
}
|
|
1042
1053
|
|
|
1043
1054
|
/**
|
|
@@ -1106,13 +1117,13 @@ function writeCsvLines(stream, ev, reading, il, isParsha) {
|
|
|
1106
1117
|
const parsha = isParsha ? ev.basename() : getLeyningKeyForEvent(ev, il) || ev.render();
|
|
1107
1118
|
const date = fmtDate(ev.getDate().greg());
|
|
1108
1119
|
const lines = getFullKriyahLines(reading);
|
|
1109
|
-
|
|
1120
|
+
for (const s of lines) {
|
|
1110
1121
|
const code = s[0].charCodeAt(0);
|
|
1111
1122
|
if (code < 48 || code > 57) {
|
|
1112
1123
|
s[0] = `"${s[0]}"`;
|
|
1113
1124
|
}
|
|
1114
1125
|
stream.write(`${date},"${parsha}",${s[0]},"${s[1]}",${s[2]}\r\n`);
|
|
1115
|
-
}
|
|
1126
|
+
}
|
|
1116
1127
|
stream.write('\r\n');
|
|
1117
1128
|
}
|
|
1118
1129
|
|
|
@@ -1124,8 +1135,7 @@ function writeCsvLines(stream, ev, reading, il, isParsha) {
|
|
|
1124
1135
|
function getFullKriyahLines(reading) {
|
|
1125
1136
|
const lines = [];
|
|
1126
1137
|
if (reading.fullkriyah) {
|
|
1127
|
-
Object.
|
|
1128
|
-
const a = reading.fullkriyah[num];
|
|
1138
|
+
for (const [num, a] of Object.entries(reading.fullkriyah)) {
|
|
1129
1139
|
if (typeof a !== 'undefined') {
|
|
1130
1140
|
var _reading$reason;
|
|
1131
1141
|
const k = num == 'M' ? 'maf' : num;
|
|
@@ -1135,7 +1145,7 @@ function getFullKriyahLines(reading) {
|
|
|
1135
1145
|
}
|
|
1136
1146
|
lines.push([k, aliyah, a.v || '']);
|
|
1137
1147
|
}
|
|
1138
|
-
}
|
|
1148
|
+
}
|
|
1139
1149
|
}
|
|
1140
1150
|
let specialHaftara = false;
|
|
1141
1151
|
if (reading.haftara) {
|
|
@@ -1156,15 +1166,14 @@ function getFullKriyahLines(reading) {
|
|
|
1156
1166
|
lines.push(['Alternate Haftara', haftara, reading.triHaftaraNumV || '']);
|
|
1157
1167
|
}
|
|
1158
1168
|
if (reading.megillah) {
|
|
1159
|
-
Object.
|
|
1160
|
-
const a = reading.megillah[num];
|
|
1169
|
+
for (const [num, a] of Object.entries(reading.megillah)) {
|
|
1161
1170
|
if (typeof a !== 'undefined') {
|
|
1162
1171
|
const aliyah = formatAliyahWithBook(a);
|
|
1163
1172
|
lines.push([`Megillah Ch. ${num}`, aliyah, a.v || '']);
|
|
1164
1173
|
}
|
|
1165
|
-
}
|
|
1174
|
+
}
|
|
1166
1175
|
}
|
|
1167
1176
|
return lines;
|
|
1168
1177
|
}
|
|
1169
1178
|
|
|
1170
|
-
export { BOOK, calculateNumVerses, clone, cloneHaftara, formatAliyahShort, formatAliyahWithBook, getLeyningForHoliday, getLeyningForHolidayKey, getLeyningForParsha, getLeyningForParshaHaShavua, getLeyningKeyForEvent, getLeyningOnDate, getParshaDates, getWeekdayReading, hasFestival, lookupFestival, lookupParsha, makeLeyningParts, makeLeyningSummary, makeSummaryFromParts, parshaToString, specialReadings2, sumVerses, writeCsvLines, writeFullKriyahCsv, writeHolidayMincha };
|
|
1179
|
+
export { BOOK, calculateNumVerses, clone, cloneHaftara, formatAliyahShort, formatAliyahWithBook, getLeyningForHoliday, getLeyningForHolidayKey, getLeyningForParsha, getLeyningForParshaHaShavua, getLeyningKeyForEvent, getLeyningOnDate, getParshaDates, getWeekdayReading, hasFestival, lookupFestival, lookupParsha, makeLeyningNames, makeLeyningParts, makeLeyningSummary, makeSummaryFromParts, parshaToString, specialReadings2, sumVerses, writeCsvLines, writeFullKriyahCsv, writeHolidayMincha };
|
package/leyning.d.ts
CHANGED
|
@@ -28,17 +28,26 @@ declare module '@hebcal/leyning' {
|
|
|
28
28
|
[key: string]: Aliyah;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
/** Name of the parsha hashavua or holiday */
|
|
32
|
+
export type LeyningNames = {
|
|
33
|
+
/** English */
|
|
34
|
+
en: string;
|
|
35
|
+
/** Hebrew (with nikud) */
|
|
36
|
+
he: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Transliterated English and Hebrew names of this parsha
|
|
41
|
+
* @param parsha untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei']
|
|
42
|
+
*/
|
|
43
|
+
export function makeLeyningNames(parsha: string | string[]): LeyningNames;
|
|
44
|
+
|
|
31
45
|
/**
|
|
32
46
|
* Leyning for a parsha hashavua or holiday
|
|
33
47
|
*/
|
|
34
48
|
export type Leyning = {
|
|
35
49
|
/** Name of the parsha hashavua or holiday */
|
|
36
|
-
name:
|
|
37
|
-
/** English */
|
|
38
|
-
en: string;
|
|
39
|
-
/** Hebrew (with nikud) */
|
|
40
|
-
he: string;
|
|
41
|
-
};
|
|
50
|
+
name: LeyningNames;
|
|
42
51
|
/** An array of either 1 (regular) or 2 (doubled parsha). `undefined` for holiday readings */
|
|
43
52
|
parsha?: string[];
|
|
44
53
|
/** 1 for Bereshit, 2 for Noach, etc. `undefined` for holiday readings */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebcal/leyning",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"author": "Michael J. Radwin (https://github.com/mjradwin)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hebcal",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"leyning-csv": "bin/leyning-csv"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@hebcal/core": "^5.0.
|
|
34
|
+
"@hebcal/core": "^5.0.1"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "rollup -c",
|
|
@@ -47,20 +47,20 @@
|
|
|
47
47
|
]
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@babel/core": "^7.23.
|
|
51
|
-
"@babel/preset-env": "^7.23.
|
|
50
|
+
"@babel/core": "^7.23.5",
|
|
51
|
+
"@babel/preset-env": "^7.23.5",
|
|
52
52
|
"@babel/register": "^7.22.15",
|
|
53
53
|
"@rollup/plugin-babel": "^6.0.4",
|
|
54
54
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
55
55
|
"@rollup/plugin-json": "^6.0.1",
|
|
56
56
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
57
57
|
"@rollup/plugin-terser": "^0.4.4",
|
|
58
|
-
"ava": "^
|
|
59
|
-
"core-js": "^3.
|
|
60
|
-
"eslint": "^8.
|
|
58
|
+
"ava": "^6.0.1",
|
|
59
|
+
"core-js": "^3.34.0",
|
|
60
|
+
"eslint": "^8.55.0",
|
|
61
61
|
"eslint-config-google": "^0.14.0",
|
|
62
62
|
"jsdoc": "^4.0.2",
|
|
63
63
|
"jsdoc-to-markdown": "^8.0.0",
|
|
64
|
-
"rollup": "^4.
|
|
64
|
+
"rollup": "^4.7.0"
|
|
65
65
|
}
|
|
66
66
|
}
|