@hebcal/leyning 8.2.1 → 8.2.3
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 +1 -511
- package/dist/aliyot.json.d.ts +7 -7
- package/dist/bundle.js +44 -25
- package/dist/bundle.min.js +2 -2
- package/dist/clone.d.ts +1 -2
- package/dist/getLeyningForHoliday.d.ts +3 -3
- package/dist/getLeyningKeyForEvent.d.ts +3 -3
- package/dist/holiday-readings.json.d.ts +1 -0
- package/dist/index.cjs +44 -25
- package/dist/index.mjs +45 -26
- package/dist/leyning.d.ts +4 -5
- package/dist/types.d.ts +9 -7
- package/package.json +19 -17
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/leyning v8.2.
|
|
1
|
+
/*! @hebcal/leyning v8.2.3 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var core = require('@hebcal/core');
|
|
@@ -461,7 +461,10 @@ var festivals0 = { "Pesach I": {
|
|
|
461
461
|
"M": { "p": 41, "k": 4, "b": "29:1", "e": "29:6" } }
|
|
462
462
|
},
|
|
463
463
|
"Rosh Hashana II": {
|
|
464
|
-
"haft": {
|
|
464
|
+
"haft": {
|
|
465
|
+
"k": "Jeremiah", "b": "31:2", "e": "31:20",
|
|
466
|
+
"note": "labeled 31:1–19 in some books"
|
|
467
|
+
},
|
|
465
468
|
"fullkriyah": { "1": { "p": 4, "k": 1, "b": "22:1", "e": "22:3" },
|
|
466
469
|
"2": { "p": 4, "k": 1, "b": "22:4", "e": "22:8" },
|
|
467
470
|
"3": { "p": 4, "k": 1, "b": "22:9", "e": "22:14" },
|
|
@@ -884,9 +887,9 @@ const HOLIDAY_IGNORE_MASK = core.flags.DAF_YOMI | core.flags.OMER_COUNT | core.f
|
|
|
884
887
|
core.flags.MODERN_HOLIDAY | core.flags.YERUSHALMI_YOMI;
|
|
885
888
|
/**
|
|
886
889
|
* Based on the event date, type and title, finds the relevant leyning key
|
|
887
|
-
* @param
|
|
888
|
-
* @param
|
|
889
|
-
* @
|
|
890
|
+
* @param ev event
|
|
891
|
+
* @param [il] true if Israel holiday scheme
|
|
892
|
+
* @returns key to look up in holiday-reading.json
|
|
890
893
|
*/
|
|
891
894
|
function getLeyningKeyForEvent(ev, il = false) {
|
|
892
895
|
if (typeof ev.eventTime !== 'undefined') {
|
|
@@ -1205,9 +1208,9 @@ function getLeyningForHolidayKey(key, cholHaMoedDay, il) {
|
|
|
1205
1208
|
/**
|
|
1206
1209
|
* Looks up leyning for a given holiday. Returns some
|
|
1207
1210
|
* of full kriyah aliyot, special Maftir, special Haftarah
|
|
1208
|
-
* @param
|
|
1209
|
-
* @param
|
|
1210
|
-
* @
|
|
1211
|
+
* @param ev the Hebcal event associated with this leyning
|
|
1212
|
+
* @param [il] true if Israel holiday scheme
|
|
1213
|
+
* @returns map of aliyot
|
|
1211
1214
|
*/
|
|
1212
1215
|
function getLeyningForHoliday(ev, il = false) {
|
|
1213
1216
|
if (typeof ev !== 'object' || typeof ev.getFlags !== 'function') {
|
|
@@ -2377,7 +2380,8 @@ var parshiyotObj0 = {
|
|
|
2377
2380
|
}
|
|
2378
2381
|
},
|
|
2379
2382
|
"Vayakhel-Pekudei": {
|
|
2380
|
-
"num":
|
|
2383
|
+
"num": [22, 23],
|
|
2384
|
+
"combined": true,
|
|
2381
2385
|
"p1": "Vayakhel",
|
|
2382
2386
|
"p2": "Pekudei",
|
|
2383
2387
|
"num1": 22,
|
|
@@ -2395,7 +2399,8 @@ var parshiyotObj0 = {
|
|
|
2395
2399
|
}
|
|
2396
2400
|
},
|
|
2397
2401
|
"Tazria-Metzora": {
|
|
2398
|
-
"num":
|
|
2402
|
+
"num": [27, 28],
|
|
2403
|
+
"combined": true,
|
|
2399
2404
|
"p1": "Tazria",
|
|
2400
2405
|
"p2": "Metzora",
|
|
2401
2406
|
"num1": 27,
|
|
@@ -2413,7 +2418,8 @@ var parshiyotObj0 = {
|
|
|
2413
2418
|
}
|
|
2414
2419
|
},
|
|
2415
2420
|
"Achrei Mot-Kedoshim": {
|
|
2416
|
-
"num":
|
|
2421
|
+
"num": [29, 30],
|
|
2422
|
+
"combined": true,
|
|
2417
2423
|
"p1": "Achrei Mot",
|
|
2418
2424
|
"p2": "Kedoshim",
|
|
2419
2425
|
"num1": 29,
|
|
@@ -2433,7 +2439,8 @@ var parshiyotObj0 = {
|
|
|
2433
2439
|
}
|
|
2434
2440
|
},
|
|
2435
2441
|
"Behar-Bechukotai": {
|
|
2436
|
-
"num":
|
|
2442
|
+
"num": [32, 33],
|
|
2443
|
+
"combined": true,
|
|
2437
2444
|
"p1": "Behar",
|
|
2438
2445
|
"p2": "Bechukotai",
|
|
2439
2446
|
"num1": 32,
|
|
@@ -2451,7 +2458,8 @@ var parshiyotObj0 = {
|
|
|
2451
2458
|
}
|
|
2452
2459
|
},
|
|
2453
2460
|
"Chukat-Balak": {
|
|
2454
|
-
"num":
|
|
2461
|
+
"num": [39, 40],
|
|
2462
|
+
"combined": true,
|
|
2455
2463
|
"p1": "Chukat",
|
|
2456
2464
|
"p2": "Balak",
|
|
2457
2465
|
"num1": 39,
|
|
@@ -2469,7 +2477,8 @@ var parshiyotObj0 = {
|
|
|
2469
2477
|
}
|
|
2470
2478
|
},
|
|
2471
2479
|
"Matot-Masei": {
|
|
2472
|
-
"num":
|
|
2480
|
+
"num": [42, 43],
|
|
2481
|
+
"combined": true,
|
|
2473
2482
|
"p1": "Matot",
|
|
2474
2483
|
"p2": "Masei",
|
|
2475
2484
|
"num1": 42,
|
|
@@ -2487,7 +2496,8 @@ var parshiyotObj0 = {
|
|
|
2487
2496
|
}
|
|
2488
2497
|
},
|
|
2489
2498
|
"Nitzavim-Vayeilech": {
|
|
2490
|
-
"num":
|
|
2499
|
+
"num": [51, 52],
|
|
2500
|
+
"combined": true,
|
|
2491
2501
|
"p1": "Nitzavim",
|
|
2492
2502
|
"p2": "Vayeilech",
|
|
2493
2503
|
"num1": 51,
|
|
@@ -2511,8 +2521,6 @@ const parshiyotObj = parshiyotObj0;
|
|
|
2511
2521
|
* on doubled parshiot, read only the second Haftarah
|
|
2512
2522
|
* except for Nitzavim-Vayelech and Achrei Mot-Kedoshim
|
|
2513
2523
|
* @private
|
|
2514
|
-
* @param {string[]} parsha
|
|
2515
|
-
* @return {string}
|
|
2516
2524
|
*/
|
|
2517
2525
|
function getHaftaraKey(parsha) {
|
|
2518
2526
|
const first = parsha[0];
|
|
@@ -2540,8 +2548,8 @@ function makeLeyningNames(parsha) {
|
|
|
2540
2548
|
/**
|
|
2541
2549
|
* Looks up regular leyning for a weekly parsha with no special readings
|
|
2542
2550
|
* @private
|
|
2543
|
-
* @param
|
|
2544
|
-
* @
|
|
2551
|
+
* @param parsha untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei']
|
|
2552
|
+
* @returns map of aliyot
|
|
2545
2553
|
*/
|
|
2546
2554
|
function getLeyningForParshaShabbatOnly(parsha) {
|
|
2547
2555
|
const raw = lookupParsha(parsha);
|
|
@@ -2556,7 +2564,6 @@ function getLeyningForParshaShabbatOnly(parsha) {
|
|
|
2556
2564
|
const parshaNameArray = raw.combined ? [raw.p1, raw.p2] : [name];
|
|
2557
2565
|
const parts = makeLeyningParts(fullkriyah);
|
|
2558
2566
|
const summary = makeSummaryFromParts(parts);
|
|
2559
|
-
/** @type {Leyning} */
|
|
2560
2567
|
const result = {
|
|
2561
2568
|
name: makeLeyningNames(parshaNameArray),
|
|
2562
2569
|
parsha: parshaNameArray,
|
|
@@ -2618,9 +2625,9 @@ function getLeyningForParsha(parsha) {
|
|
|
2618
2625
|
/**
|
|
2619
2626
|
* Looks up leyning for a regular Shabbat parsha, including any special
|
|
2620
2627
|
* maftir or Haftara.
|
|
2621
|
-
* @param
|
|
2622
|
-
* @param
|
|
2623
|
-
* @
|
|
2628
|
+
* @param ev the Hebcal event associated with this leyning
|
|
2629
|
+
* @param [il] in Israel
|
|
2630
|
+
* @returns map of aliyot
|
|
2624
2631
|
*/
|
|
2625
2632
|
function getLeyningForParshaHaShavua(ev, il = false) {
|
|
2626
2633
|
if (typeof ev !== 'object' || typeof ev.getFlags !== 'function') {
|
|
@@ -2680,8 +2687,7 @@ function getLeyningForParshaHaShavua(ev, il = false) {
|
|
|
2680
2687
|
}
|
|
2681
2688
|
/**
|
|
2682
2689
|
* Returns the parsha metadata
|
|
2683
|
-
* @param
|
|
2684
|
-
* @return {ParshaMeta}
|
|
2690
|
+
* @param parsha untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei']
|
|
2685
2691
|
*/
|
|
2686
2692
|
function lookupParsha(parsha) {
|
|
2687
2693
|
const name = parshaToString(parsha);
|
|
@@ -2788,6 +2794,13 @@ function getLeyningOnDate(hdate, il, wantarray = false) {
|
|
|
2788
2794
|
if (mincha) {
|
|
2789
2795
|
arr.push(mincha);
|
|
2790
2796
|
}
|
|
2797
|
+
// Special case for Erev Simchat Torah - the only time we read Torah at night
|
|
2798
|
+
const desc = ev.getDesc();
|
|
2799
|
+
if ((il && desc === 'Sukkot VII (Hoshana Raba)') ||
|
|
2800
|
+
(!il && desc === 'Shmini Atzeret')) {
|
|
2801
|
+
const erevST = getLeyningForHolidayKey('Erev Simchat Torah');
|
|
2802
|
+
arr.push(erevST);
|
|
2803
|
+
}
|
|
2791
2804
|
}
|
|
2792
2805
|
}
|
|
2793
2806
|
if (!hasFullKriyah && (dow === 1 || dow === 4)) {
|
|
@@ -2876,6 +2889,12 @@ function writeFullKriyahEvent(stream, ev, il) {
|
|
|
2876
2889
|
writeCsvLines(stream, ev, reading, il, isParsha);
|
|
2877
2890
|
if (!isParsha) {
|
|
2878
2891
|
writeHolidayMincha(stream, ev, il);
|
|
2892
|
+
const desc = ev.getDesc();
|
|
2893
|
+
if ((il && desc === 'Sukkot VII (Hoshana Raba)') ||
|
|
2894
|
+
(!il && desc === 'Shmini Atzeret')) {
|
|
2895
|
+
const ev2 = new core.HolidayEvent(ev.getDate(), 'Erev Simchat Torah', core.flags.EREV);
|
|
2896
|
+
writeFullKriyahEvent(stream, ev2, il);
|
|
2897
|
+
}
|
|
2879
2898
|
}
|
|
2880
2899
|
}
|
|
2881
2900
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @hebcal/leyning v8.2.
|
|
2
|
-
import { flags, months, HDate, HebrewCalendar, Locale, ParshaEvent, Event } from '@hebcal/core';
|
|
1
|
+
/*! @hebcal/leyning v8.2.3 */
|
|
2
|
+
import { flags, months, HDate, HebrewCalendar, Locale, ParshaEvent, HolidayEvent, Event } from '@hebcal/core';
|
|
3
3
|
|
|
4
4
|
var numverses = {
|
|
5
5
|
"Genesis": [0,
|
|
@@ -459,7 +459,10 @@ var festivals0 = { "Pesach I": {
|
|
|
459
459
|
"M": { "p": 41, "k": 4, "b": "29:1", "e": "29:6" } }
|
|
460
460
|
},
|
|
461
461
|
"Rosh Hashana II": {
|
|
462
|
-
"haft": {
|
|
462
|
+
"haft": {
|
|
463
|
+
"k": "Jeremiah", "b": "31:2", "e": "31:20",
|
|
464
|
+
"note": "labeled 31:1–19 in some books"
|
|
465
|
+
},
|
|
463
466
|
"fullkriyah": { "1": { "p": 4, "k": 1, "b": "22:1", "e": "22:3" },
|
|
464
467
|
"2": { "p": 4, "k": 1, "b": "22:4", "e": "22:8" },
|
|
465
468
|
"3": { "p": 4, "k": 1, "b": "22:9", "e": "22:14" },
|
|
@@ -882,9 +885,9 @@ const HOLIDAY_IGNORE_MASK = flags.DAF_YOMI | flags.OMER_COUNT | flags.SHABBAT_ME
|
|
|
882
885
|
flags.MODERN_HOLIDAY | flags.YERUSHALMI_YOMI;
|
|
883
886
|
/**
|
|
884
887
|
* Based on the event date, type and title, finds the relevant leyning key
|
|
885
|
-
* @param
|
|
886
|
-
* @param
|
|
887
|
-
* @
|
|
888
|
+
* @param ev event
|
|
889
|
+
* @param [il] true if Israel holiday scheme
|
|
890
|
+
* @returns key to look up in holiday-reading.json
|
|
888
891
|
*/
|
|
889
892
|
function getLeyningKeyForEvent(ev, il = false) {
|
|
890
893
|
if (typeof ev.eventTime !== 'undefined') {
|
|
@@ -1203,9 +1206,9 @@ function getLeyningForHolidayKey(key, cholHaMoedDay, il) {
|
|
|
1203
1206
|
/**
|
|
1204
1207
|
* Looks up leyning for a given holiday. Returns some
|
|
1205
1208
|
* of full kriyah aliyot, special Maftir, special Haftarah
|
|
1206
|
-
* @param
|
|
1207
|
-
* @param
|
|
1208
|
-
* @
|
|
1209
|
+
* @param ev the Hebcal event associated with this leyning
|
|
1210
|
+
* @param [il] true if Israel holiday scheme
|
|
1211
|
+
* @returns map of aliyot
|
|
1209
1212
|
*/
|
|
1210
1213
|
function getLeyningForHoliday(ev, il = false) {
|
|
1211
1214
|
if (typeof ev !== 'object' || typeof ev.getFlags !== 'function') {
|
|
@@ -2375,7 +2378,8 @@ var parshiyotObj0 = {
|
|
|
2375
2378
|
}
|
|
2376
2379
|
},
|
|
2377
2380
|
"Vayakhel-Pekudei": {
|
|
2378
|
-
"num":
|
|
2381
|
+
"num": [22, 23],
|
|
2382
|
+
"combined": true,
|
|
2379
2383
|
"p1": "Vayakhel",
|
|
2380
2384
|
"p2": "Pekudei",
|
|
2381
2385
|
"num1": 22,
|
|
@@ -2393,7 +2397,8 @@ var parshiyotObj0 = {
|
|
|
2393
2397
|
}
|
|
2394
2398
|
},
|
|
2395
2399
|
"Tazria-Metzora": {
|
|
2396
|
-
"num":
|
|
2400
|
+
"num": [27, 28],
|
|
2401
|
+
"combined": true,
|
|
2397
2402
|
"p1": "Tazria",
|
|
2398
2403
|
"p2": "Metzora",
|
|
2399
2404
|
"num1": 27,
|
|
@@ -2411,7 +2416,8 @@ var parshiyotObj0 = {
|
|
|
2411
2416
|
}
|
|
2412
2417
|
},
|
|
2413
2418
|
"Achrei Mot-Kedoshim": {
|
|
2414
|
-
"num":
|
|
2419
|
+
"num": [29, 30],
|
|
2420
|
+
"combined": true,
|
|
2415
2421
|
"p1": "Achrei Mot",
|
|
2416
2422
|
"p2": "Kedoshim",
|
|
2417
2423
|
"num1": 29,
|
|
@@ -2431,7 +2437,8 @@ var parshiyotObj0 = {
|
|
|
2431
2437
|
}
|
|
2432
2438
|
},
|
|
2433
2439
|
"Behar-Bechukotai": {
|
|
2434
|
-
"num":
|
|
2440
|
+
"num": [32, 33],
|
|
2441
|
+
"combined": true,
|
|
2435
2442
|
"p1": "Behar",
|
|
2436
2443
|
"p2": "Bechukotai",
|
|
2437
2444
|
"num1": 32,
|
|
@@ -2449,7 +2456,8 @@ var parshiyotObj0 = {
|
|
|
2449
2456
|
}
|
|
2450
2457
|
},
|
|
2451
2458
|
"Chukat-Balak": {
|
|
2452
|
-
"num":
|
|
2459
|
+
"num": [39, 40],
|
|
2460
|
+
"combined": true,
|
|
2453
2461
|
"p1": "Chukat",
|
|
2454
2462
|
"p2": "Balak",
|
|
2455
2463
|
"num1": 39,
|
|
@@ -2467,7 +2475,8 @@ var parshiyotObj0 = {
|
|
|
2467
2475
|
}
|
|
2468
2476
|
},
|
|
2469
2477
|
"Matot-Masei": {
|
|
2470
|
-
"num":
|
|
2478
|
+
"num": [42, 43],
|
|
2479
|
+
"combined": true,
|
|
2471
2480
|
"p1": "Matot",
|
|
2472
2481
|
"p2": "Masei",
|
|
2473
2482
|
"num1": 42,
|
|
@@ -2485,7 +2494,8 @@ var parshiyotObj0 = {
|
|
|
2485
2494
|
}
|
|
2486
2495
|
},
|
|
2487
2496
|
"Nitzavim-Vayeilech": {
|
|
2488
|
-
"num":
|
|
2497
|
+
"num": [51, 52],
|
|
2498
|
+
"combined": true,
|
|
2489
2499
|
"p1": "Nitzavim",
|
|
2490
2500
|
"p2": "Vayeilech",
|
|
2491
2501
|
"num1": 51,
|
|
@@ -2509,8 +2519,6 @@ const parshiyotObj = parshiyotObj0;
|
|
|
2509
2519
|
* on doubled parshiot, read only the second Haftarah
|
|
2510
2520
|
* except for Nitzavim-Vayelech and Achrei Mot-Kedoshim
|
|
2511
2521
|
* @private
|
|
2512
|
-
* @param {string[]} parsha
|
|
2513
|
-
* @return {string}
|
|
2514
2522
|
*/
|
|
2515
2523
|
function getHaftaraKey(parsha) {
|
|
2516
2524
|
const first = parsha[0];
|
|
@@ -2538,8 +2546,8 @@ function makeLeyningNames(parsha) {
|
|
|
2538
2546
|
/**
|
|
2539
2547
|
* Looks up regular leyning for a weekly parsha with no special readings
|
|
2540
2548
|
* @private
|
|
2541
|
-
* @param
|
|
2542
|
-
* @
|
|
2549
|
+
* @param parsha untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei']
|
|
2550
|
+
* @returns map of aliyot
|
|
2543
2551
|
*/
|
|
2544
2552
|
function getLeyningForParshaShabbatOnly(parsha) {
|
|
2545
2553
|
const raw = lookupParsha(parsha);
|
|
@@ -2554,7 +2562,6 @@ function getLeyningForParshaShabbatOnly(parsha) {
|
|
|
2554
2562
|
const parshaNameArray = raw.combined ? [raw.p1, raw.p2] : [name];
|
|
2555
2563
|
const parts = makeLeyningParts(fullkriyah);
|
|
2556
2564
|
const summary = makeSummaryFromParts(parts);
|
|
2557
|
-
/** @type {Leyning} */
|
|
2558
2565
|
const result = {
|
|
2559
2566
|
name: makeLeyningNames(parshaNameArray),
|
|
2560
2567
|
parsha: parshaNameArray,
|
|
@@ -2616,9 +2623,9 @@ function getLeyningForParsha(parsha) {
|
|
|
2616
2623
|
/**
|
|
2617
2624
|
* Looks up leyning for a regular Shabbat parsha, including any special
|
|
2618
2625
|
* maftir or Haftara.
|
|
2619
|
-
* @param
|
|
2620
|
-
* @param
|
|
2621
|
-
* @
|
|
2626
|
+
* @param ev the Hebcal event associated with this leyning
|
|
2627
|
+
* @param [il] in Israel
|
|
2628
|
+
* @returns map of aliyot
|
|
2622
2629
|
*/
|
|
2623
2630
|
function getLeyningForParshaHaShavua(ev, il = false) {
|
|
2624
2631
|
if (typeof ev !== 'object' || typeof ev.getFlags !== 'function') {
|
|
@@ -2678,8 +2685,7 @@ function getLeyningForParshaHaShavua(ev, il = false) {
|
|
|
2678
2685
|
}
|
|
2679
2686
|
/**
|
|
2680
2687
|
* Returns the parsha metadata
|
|
2681
|
-
* @param
|
|
2682
|
-
* @return {ParshaMeta}
|
|
2688
|
+
* @param parsha untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei']
|
|
2683
2689
|
*/
|
|
2684
2690
|
function lookupParsha(parsha) {
|
|
2685
2691
|
const name = parshaToString(parsha);
|
|
@@ -2786,6 +2792,13 @@ function getLeyningOnDate(hdate, il, wantarray = false) {
|
|
|
2786
2792
|
if (mincha) {
|
|
2787
2793
|
arr.push(mincha);
|
|
2788
2794
|
}
|
|
2795
|
+
// Special case for Erev Simchat Torah - the only time we read Torah at night
|
|
2796
|
+
const desc = ev.getDesc();
|
|
2797
|
+
if ((il && desc === 'Sukkot VII (Hoshana Raba)') ||
|
|
2798
|
+
(!il && desc === 'Shmini Atzeret')) {
|
|
2799
|
+
const erevST = getLeyningForHolidayKey('Erev Simchat Torah');
|
|
2800
|
+
arr.push(erevST);
|
|
2801
|
+
}
|
|
2789
2802
|
}
|
|
2790
2803
|
}
|
|
2791
2804
|
if (!hasFullKriyah && (dow === 1 || dow === 4)) {
|
|
@@ -2874,6 +2887,12 @@ function writeFullKriyahEvent(stream, ev, il) {
|
|
|
2874
2887
|
writeCsvLines(stream, ev, reading, il, isParsha);
|
|
2875
2888
|
if (!isParsha) {
|
|
2876
2889
|
writeHolidayMincha(stream, ev, il);
|
|
2890
|
+
const desc = ev.getDesc();
|
|
2891
|
+
if ((il && desc === 'Sukkot VII (Hoshana Raba)') ||
|
|
2892
|
+
(!il && desc === 'Shmini Atzeret')) {
|
|
2893
|
+
const ev2 = new HolidayEvent(ev.getDate(), 'Erev Simchat Torah', flags.EREV);
|
|
2894
|
+
writeFullKriyahEvent(stream, ev2, il);
|
|
2895
|
+
}
|
|
2877
2896
|
}
|
|
2878
2897
|
}
|
|
2879
2898
|
}
|
package/dist/leyning.d.ts
CHANGED
|
@@ -18,14 +18,13 @@ export declare function getLeyningForParsha(parsha: string | string[]): Leyning;
|
|
|
18
18
|
/**
|
|
19
19
|
* Looks up leyning for a regular Shabbat parsha, including any special
|
|
20
20
|
* maftir or Haftara.
|
|
21
|
-
* @param
|
|
22
|
-
* @param
|
|
23
|
-
* @
|
|
21
|
+
* @param ev the Hebcal event associated with this leyning
|
|
22
|
+
* @param [il] in Israel
|
|
23
|
+
* @returns map of aliyot
|
|
24
24
|
*/
|
|
25
25
|
export declare function getLeyningForParshaHaShavua(ev: Event, il?: boolean): Leyning;
|
|
26
26
|
/**
|
|
27
27
|
* Returns the parsha metadata
|
|
28
|
-
* @param
|
|
29
|
-
* @return {ParshaMeta}
|
|
28
|
+
* @param parsha untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei']
|
|
30
29
|
*/
|
|
31
30
|
export declare function lookupParsha(parsha: string | string[]): ParshaMeta;
|
package/dist/types.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export type LeyningNames = {
|
|
|
32
32
|
*/
|
|
33
33
|
export type ParshaMeta = {
|
|
34
34
|
/** 1 for Bereshit, 2 for Noach, etc. `undefined` for holiday readings */
|
|
35
|
-
num: number;
|
|
35
|
+
num: number | number[];
|
|
36
36
|
/** parsha name in Hebrew with niqud */
|
|
37
37
|
hebrew: string;
|
|
38
38
|
/** 1 for Genesis, 2 for Exodus, 5 for Deuteronomy */
|
|
@@ -98,18 +98,20 @@ export type LeyningWeekday = LeyningParshaHaShavua & {
|
|
|
98
98
|
/** Optional map of weekday Torah Readings aliyot `1` through `3` for Monday and Thursday */
|
|
99
99
|
weekday?: AliyotMap;
|
|
100
100
|
};
|
|
101
|
-
|
|
102
|
-
* Shabbat and holiday leyning always has full kriyah and haftarah
|
|
103
|
-
*/
|
|
104
|
-
export type LeyningShabbatHoliday = LeyningBase & {
|
|
105
|
-
/** Map of aliyot `1` through `7` plus `M` for maftir */
|
|
106
|
-
fullkriyah: AliyotMap;
|
|
101
|
+
export type HaftarahProps = {
|
|
107
102
|
/** Haftarah object */
|
|
108
103
|
haft: Aliyah | Aliyah[];
|
|
109
104
|
/** Haftarah, such as `Isaiah 42:5 – 43:11` */
|
|
110
105
|
haftara: string;
|
|
111
106
|
/** Number of verses in the Haftarah */
|
|
112
107
|
haftaraNumV?: number;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Shabbat and holiday leyning always has full kriyah and haftarah
|
|
111
|
+
*/
|
|
112
|
+
export type LeyningShabbatHoliday = LeyningBase & HaftarahProps & {
|
|
113
|
+
/** Map of aliyot `1` through `7` plus `M` for maftir */
|
|
114
|
+
fullkriyah: AliyotMap;
|
|
113
115
|
/** Haftarah object for Sephardim */
|
|
114
116
|
seph?: Aliyah | Aliyah[];
|
|
115
117
|
/** Haftarah for Sephardim, such as `Isaiah 42:5 - 42:21` */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebcal/leyning",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.3",
|
|
4
4
|
"author": "Michael J. Radwin (https://github.com/mjradwin)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hebcal",
|
|
@@ -40,36 +40,38 @@
|
|
|
40
40
|
"leyning-csv": "bin/leyning-csv"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@hebcal/core": "^5.
|
|
44
|
-
"tslib": "^2.
|
|
43
|
+
"@hebcal/core": "^5.5.0",
|
|
44
|
+
"tslib": "^2.7.0"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build:rollup": "rollup -c",
|
|
48
48
|
"build:json2js": "for f in src/*.json; do echo 'export default' > $f.ts && cat $f >> $f.ts; done",
|
|
49
49
|
"build": "npm run build:json2js && npm run build:rollup",
|
|
50
50
|
"prepublish": "npm run build",
|
|
51
|
-
"
|
|
51
|
+
"docs": "typedoc",
|
|
52
52
|
"pretest": "npm run build",
|
|
53
|
-
"
|
|
53
|
+
"lint": "gts lint",
|
|
54
|
+
"coverage": "jest --coverage",
|
|
55
|
+
"test": "jest",
|
|
56
|
+
"clean": "gts clean",
|
|
57
|
+
"fix": "gts fix"
|
|
54
58
|
},
|
|
55
59
|
"license": "BSD-2-Clause",
|
|
56
60
|
"devDependencies": {
|
|
57
|
-
"@babel/preset-env": "^7.
|
|
61
|
+
"@babel/preset-env": "^7.25.4",
|
|
58
62
|
"@babel/preset-typescript": "^7.24.7",
|
|
59
|
-
"@rollup/plugin-commonjs": "^
|
|
63
|
+
"@rollup/plugin-commonjs": "^28.0.0",
|
|
60
64
|
"@rollup/plugin-json": "^6.1.0",
|
|
61
|
-
"@rollup/plugin-node-resolve": "^15.
|
|
65
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
62
66
|
"@rollup/plugin-terser": "^0.4.4",
|
|
63
|
-
"@rollup/plugin-typescript": "^
|
|
64
|
-
"@types/jest": "^29.5.
|
|
65
|
-
"
|
|
66
|
-
"eslint-config-google": "^0.14.0",
|
|
67
|
+
"@rollup/plugin-typescript": "^12.1.0",
|
|
68
|
+
"@types/jest": "^29.5.13",
|
|
69
|
+
"@types/node": "^22.7.2",
|
|
67
70
|
"gts": "^5.3.1",
|
|
68
71
|
"jest": "^29.7.0",
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"typescript": "^5.5.2"
|
|
72
|
+
"rollup": "^4.22.4",
|
|
73
|
+
"ts-jest": "^29.2.5",
|
|
74
|
+
"typedoc": "^0.26.7",
|
|
75
|
+
"typescript": "^5.6.2"
|
|
74
76
|
}
|
|
75
77
|
}
|