@hebcal/leyning 4.17.0 → 4.18.2
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 +52 -2
- package/dist/bundle.js +589 -438
- package/dist/bundle.min.js +2 -2
- package/dist/index.js +273 -171
- package/dist/index.mjs +274 -172
- package/leyning.d.ts +35 -8
- package/package.json +4 -4
package/leyning.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node"/>
|
|
2
2
|
|
|
3
|
-
import {Event} from '@hebcal/core';
|
|
3
|
+
import {Event, HDate} from '@hebcal/core';
|
|
4
4
|
import {WriteStream} from 'fs';
|
|
5
5
|
|
|
6
6
|
declare module '@hebcal/leyning' {
|
|
@@ -28,6 +28,14 @@ declare module '@hebcal/leyning' {
|
|
|
28
28
|
* Leyning for a parsha hashavua or holiday
|
|
29
29
|
*/
|
|
30
30
|
export type Leyning = {
|
|
31
|
+
name: {
|
|
32
|
+
en: string;
|
|
33
|
+
he: string;
|
|
34
|
+
};
|
|
35
|
+
/** An array of either 1 (regular) or 2 (doubled parsha). `undefined` for holiday readings */
|
|
36
|
+
parsha?: string[];
|
|
37
|
+
/** 1 for Bereshit, 2 for Noach, etc. `undefined` for holiday readings */
|
|
38
|
+
parshaNum?: number;
|
|
31
39
|
/** Such as `Genesis 1:1 - 6:8` */
|
|
32
40
|
summary: string;
|
|
33
41
|
/** Haftarah object */
|
|
@@ -52,6 +60,24 @@ declare module '@hebcal/leyning' {
|
|
|
52
60
|
};
|
|
53
61
|
};
|
|
54
62
|
|
|
63
|
+
/**
|
|
64
|
+
* Looks up leyning for a regular Shabbat, Monday/Thursday weekday or holiday.
|
|
65
|
+
*
|
|
66
|
+
* If `hdate` coincides with a holiday that has Torah reading, returns the
|
|
67
|
+
* reading for that day (see {@link getLeyningForHoliday})
|
|
68
|
+
*
|
|
69
|
+
* Otherwise, if `hdate` is a Saturday, returns {@link getLeyningForParshaHaShavua}
|
|
70
|
+
*
|
|
71
|
+
* Otherwise, if `hdate` is a Monday or Thursday, returns {@link Leyning} for the
|
|
72
|
+
* Parashat haShavua, containing only the `weekday` aliyot (no `fullkriyah`).
|
|
73
|
+
*
|
|
74
|
+
* Otherwise, returns `undefined`.
|
|
75
|
+
* @param hdate Hebrew Date
|
|
76
|
+
* @param il in Israel
|
|
77
|
+
* @returns map of aliyot
|
|
78
|
+
*/
|
|
79
|
+
export function getLeyningOnDate(hdate: HDate, il: boolean): Leyning;
|
|
80
|
+
|
|
55
81
|
/**
|
|
56
82
|
* Represents triennial aliyot for a given date
|
|
57
83
|
*/
|
|
@@ -77,20 +103,20 @@ declare module '@hebcal/leyning' {
|
|
|
77
103
|
|
|
78
104
|
/**
|
|
79
105
|
* Based on the event date, type and title, finds the relevant leyning key
|
|
80
|
-
* @param
|
|
106
|
+
* @param ev - the Hebcal holiday event
|
|
81
107
|
* @param [il] - true if Israel holiday scheme
|
|
82
108
|
* @returns key to look up in holiday-reading.json
|
|
83
109
|
*/
|
|
84
|
-
export function getLeyningKeyForEvent(
|
|
110
|
+
export function getLeyningKeyForEvent(ev: Event, il?: boolean): string;
|
|
85
111
|
|
|
86
112
|
/**
|
|
87
113
|
* Looks up leyning for a given holiday. Returns some
|
|
88
114
|
* of full kriyah aliyot, special Maftir, special Haftarah
|
|
89
|
-
* @param
|
|
115
|
+
* @param ev - the Hebcal event associated with this leyning
|
|
90
116
|
* @param [il] - true if Israel holiday scheme
|
|
91
117
|
* @returns map of aliyot
|
|
92
118
|
*/
|
|
93
|
-
export function getLeyningForHoliday(
|
|
119
|
+
export function getLeyningForHoliday(ev: Event, il?: boolean): Leyning;
|
|
94
120
|
|
|
95
121
|
/**
|
|
96
122
|
* Looks up leyning for a given holiday key. Key should be an
|
|
@@ -102,12 +128,13 @@ declare module '@hebcal/leyning' {
|
|
|
102
128
|
export function getLeyningForHolidayKey(key: string): Leyning;
|
|
103
129
|
|
|
104
130
|
/**
|
|
105
|
-
* Looks up leyning for a regular Shabbat parsha
|
|
106
|
-
*
|
|
131
|
+
* Looks up leyning for a regular Shabbat parsha, including any special
|
|
132
|
+
* maftir or Haftara.
|
|
133
|
+
* @param ev - the Hebcal event associated with this leyning
|
|
107
134
|
* @param [il] - in Israel
|
|
108
135
|
* @returns map of aliyot
|
|
109
136
|
*/
|
|
110
|
-
export function getLeyningForParshaHaShavua(
|
|
137
|
+
export function getLeyningForParshaHaShavua(ev: Event, il?: boolean): Leyning;
|
|
111
138
|
|
|
112
139
|
/**
|
|
113
140
|
* Looks up regular leyning for a weekly parsha with no special readings
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebcal/leyning",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.18.2",
|
|
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": "^3.42.
|
|
34
|
+
"@hebcal/core": "^3.42.2"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "rollup -c",
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
62
62
|
"ava": "^4.3.1",
|
|
63
63
|
"core-js": "^3.24.1",
|
|
64
|
-
"eslint": "^8.
|
|
64
|
+
"eslint": "^8.22.0",
|
|
65
65
|
"eslint-config-google": "^0.14.0",
|
|
66
66
|
"jsdoc": "^3.6.11",
|
|
67
67
|
"jsdoc-to-markdown": "^7.1.1",
|
|
68
|
-
"rollup": "^2.
|
|
68
|
+
"rollup": "^2.78.0",
|
|
69
69
|
"rollup-plugin-terser": "^7.0.2"
|
|
70
70
|
}
|
|
71
71
|
}
|