@hebcal/leyning 8.1.9 → 8.2.1

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.
@@ -0,0 +1,20 @@
1
+ export type JsonFestivalAliyah = {
2
+ k: number | string;
3
+ b: string;
4
+ e: string;
5
+ v?: number;
6
+ p?: number;
7
+ };
8
+ export type JsonFestivalAliyotMap = {
9
+ [key: string]: JsonFestivalAliyah;
10
+ };
11
+ export type JsonFestivalLeyning = {
12
+ haft?: JsonFestivalAliyah | JsonFestivalAliyah[];
13
+ seph?: JsonFestivalAliyah | JsonFestivalAliyah[];
14
+ fullkriyah?: JsonFestivalAliyotMap;
15
+ megillah?: string;
16
+ alias?: boolean;
17
+ key?: string;
18
+ note?: string;
19
+ il?: boolean;
20
+ };
@@ -0,0 +1,31 @@
1
+ import { Event } from '@hebcal/core';
2
+ import { AliyotMap, Leyning, LeyningNames, ParshaMeta } from './types';
3
+ /**
4
+ * Transliterated English and Hebrew names of this parsha
5
+ * @param parsha untranslated name like ['Pinchas'] or ['Matot','Masei']
6
+ */
7
+ export declare function makeLeyningNames(parsha: string[]): LeyningNames;
8
+ /**
9
+ * Looks up Monday/Thursday aliyot for a regular parsha
10
+ * @param parsha untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei']
11
+ */
12
+ export declare function getWeekdayReading(parsha: string | string[]): AliyotMap;
13
+ /**
14
+ * Looks up regular leyning for a weekly parsha with no special readings
15
+ * @param parsha untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei']
16
+ */
17
+ export declare function getLeyningForParsha(parsha: string | string[]): Leyning;
18
+ /**
19
+ * Looks up leyning for a regular Shabbat parsha, including any special
20
+ * maftir or Haftara.
21
+ * @param {Event} ev the Hebcal event associated with this leyning
22
+ * @param {boolean} [il] in Israel
23
+ * @return {Leyning} map of aliyot
24
+ */
25
+ export declare function getLeyningForParshaHaShavua(ev: Event, il?: boolean): Leyning;
26
+ /**
27
+ * Returns the parsha metadata
28
+ * @param {string|string[]} parsha untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei']
29
+ * @return {ParshaMeta}
30
+ */
31
+ export declare function lookupParsha(parsha: string | string[]): ParshaMeta;
@@ -0,0 +1,36 @@
1
+ declare const _default: {
2
+ Genesis: number[];
3
+ Exodus: number[];
4
+ Leviticus: number[];
5
+ Numbers: number[];
6
+ Deuteronomy: number[];
7
+ Joshua: number[];
8
+ Judges: number[];
9
+ Ruth: number[];
10
+ "I Samuel": number[];
11
+ "II Samuel": number[];
12
+ "I Kings": number[];
13
+ "II Kings": number[];
14
+ Isaiah: number[];
15
+ Jeremiah: number[];
16
+ Lamentations: number[];
17
+ Baruch: number[];
18
+ Esther: number[];
19
+ Ecclesiastes: number[];
20
+ "Song of Songs": number[];
21
+ Ezekiel: number[];
22
+ Daniel: number[];
23
+ Hosea: number[];
24
+ Joel: number[];
25
+ Amos: number[];
26
+ Obadiah: number[];
27
+ Jonah: number[];
28
+ Micah: number[];
29
+ Nachum: number[];
30
+ Habakkuk: number[];
31
+ Zephaniah: number[];
32
+ Haggai: number[];
33
+ Zechariah: number[];
34
+ Malachi: number[];
35
+ };
36
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import { HDate } from '@hebcal/core';
2
+ import { AliyotMap, SpecialReading } from './types';
3
+ /**
4
+ * Determines if the regular parashat haShavua coincides with an event that requires
5
+ * a special maftir or Haftara (for example Shabbat HaGadol, Shabbat Chanukah, Rosh
6
+ * Chodesh or Machar Chodesh, etc.).
7
+ *
8
+ * This function does not modify `aliyot`. Instead, it returns a deep copy
9
+ * with `aliyot['M']` replaced and sets `reason.M`
10
+ * (and in some cases the 6th and 7th aliyah, setting `reason['7']`).
11
+ *
12
+ * If a special Haftarah applies, the result will have a `haft` property
13
+ * pointing to Haftarah object and sets `reason.haftara`.
14
+ */
15
+ export declare function specialReadings2(parsha: string[], hd: HDate, il: boolean, aliyot: AliyotMap): SpecialReading;
@@ -0,0 +1,18 @@
1
+ import { Aliyah, AliyotMap } from './types';
2
+ /**
3
+ * Summarizes an `AliyotMap` by collapsing all adjacent aliyot.
4
+ * Finds any non-overlapping parts (e.g. special 7th aliyah or maftir)
5
+ */
6
+ export declare function makeLeyningParts(aliyot: AliyotMap): Aliyah[];
7
+ /**
8
+ * Returns a string representation of the leyning parts.
9
+ * Separate verse ranges read from the same book are separated
10
+ * by commas, e.g. `Isaiah 6:1-7:6, 9:5-6`.
11
+ * Verse ranges from different books are separated by semicolons,
12
+ * e.g. `Genesis 21:1-34; Numbers 29:1-6`.
13
+ */
14
+ export declare function makeSummaryFromParts(parts: Aliyah | Aliyah[]): string;
15
+ /**
16
+ * Makes a summary of the leyning, like "Genesis 6:9-11:32"
17
+ */
18
+ export declare function makeLeyningSummary(aliyot: AliyotMap): string;
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Represents an aliyah
3
+ */
4
+ export type Aliyah = {
5
+ /** Book (e.g. "Numbers") */
6
+ k: string;
7
+ /** beginning verse (e.g. "28:9") */
8
+ b: string;
9
+ /** ending verse (e.g. "28:15") */
10
+ e: string;
11
+ /** number of verses */
12
+ v?: number;
13
+ /** parsha number (1=Bereshit, 54=Vezot HaBracha) */
14
+ p?: number;
15
+ reason?: string;
16
+ };
17
+ export type StringMap = {
18
+ [key: string]: string;
19
+ };
20
+ export type AliyotMap = {
21
+ [key: string]: Aliyah;
22
+ };
23
+ /** Name of the parsha hashavua or holiday */
24
+ export type LeyningNames = {
25
+ /** English */
26
+ en: string;
27
+ /** Hebrew (with nikud) */
28
+ he: string;
29
+ };
30
+ /**
31
+ * Parsha metadata (underlying JSON object)
32
+ */
33
+ export type ParshaMeta = {
34
+ /** 1 for Bereshit, 2 for Noach, etc. `undefined` for holiday readings */
35
+ num: number;
36
+ /** parsha name in Hebrew with niqud */
37
+ hebrew: string;
38
+ /** 1 for Genesis, 2 for Exodus, 5 for Deuteronomy */
39
+ book: number;
40
+ /** Haftarah object(s) */
41
+ haft: Aliyah | Aliyah[];
42
+ /** Haftarah object(s) for Sephardim */
43
+ seph?: Aliyah | Aliyah[];
44
+ /** Map of Shabbat aliyot `1` through `7` plus `M` for maftir */
45
+ fullkriyah: {
46
+ [key: string]: string[];
47
+ };
48
+ /**
49
+ * Map of weekday Torah Readings
50
+ * aliyot `1` through `3` for Monday and Thursday
51
+ */
52
+ weekday?: {
53
+ [key: string]: string[];
54
+ };
55
+ combined?: boolean;
56
+ p1?: string;
57
+ p2?: string;
58
+ num1?: number;
59
+ num2?: number;
60
+ };
61
+ export type SpecialReading = {
62
+ /** Map of aliyot `1` through `7` plus `M` for maftir */
63
+ aliyot: AliyotMap;
64
+ /**
65
+ * Explanations for special readings,
66
+ * keyed by aliyah number, `M` for maftir or `haftara` for Haftarah
67
+ */
68
+ reason: StringMap;
69
+ /** Haftarah object(s) */
70
+ haft?: Aliyah | Aliyah[];
71
+ /** Haftarah object(s) for Sephardim */
72
+ seph?: Aliyah | Aliyah[];
73
+ };
74
+ /**
75
+ * Leyning base - weekday, parsha hashavua or holiday
76
+ */
77
+ export type LeyningBase = {
78
+ /** Name of the parsha hashavua or holiday */
79
+ name: LeyningNames;
80
+ /** Such as `Genesis 1:1 - 6:8` */
81
+ summary: string;
82
+ summaryParts?: Aliyah[];
83
+ note?: string;
84
+ };
85
+ /**
86
+ * Parashat haShavua - weekday or Shabbat
87
+ */
88
+ export type LeyningParshaHaShavua = LeyningBase & {
89
+ /** An array of either 1 (regular) or 2 (doubled parsha). `undefined` for holiday readings */
90
+ parsha?: string[];
91
+ /** 1 for Bereshit, 2 for Noach, etc. `undefined` for holiday readings */
92
+ parshaNum?: number | number[];
93
+ };
94
+ /**
95
+ * Parashat haShavua - weekday
96
+ */
97
+ export type LeyningWeekday = LeyningParshaHaShavua & {
98
+ /** Optional map of weekday Torah Readings aliyot `1` through `3` for Monday and Thursday */
99
+ weekday?: AliyotMap;
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;
107
+ /** Haftarah object */
108
+ haft: Aliyah | Aliyah[];
109
+ /** Haftarah, such as `Isaiah 42:5 – 43:11` */
110
+ haftara: string;
111
+ /** Number of verses in the Haftarah */
112
+ haftaraNumV?: number;
113
+ /** Haftarah object for Sephardim */
114
+ seph?: Aliyah | Aliyah[];
115
+ /** Haftarah for Sephardim, such as `Isaiah 42:5 - 42:21` */
116
+ sephardic?: string;
117
+ /** Number of verses in the Haftarah for Sephardim */
118
+ sephardicNumV?: number;
119
+ /** Explanations for special readings, keyed by aliyah number, `M` for maftir or `haftara` for Haftarah */
120
+ reason?: StringMap;
121
+ /** Song of Songs is read on the sabbath of Passover week, the Book of Ruth on Shavuot, Lamentations on Tisha be-Av, Ecclesiastes on the sabbath of the week of Sukkoth, and the Book of Esther on Purim */
122
+ megillah?: AliyotMap;
123
+ /** Triennial alternate Haftara */
124
+ triHaftara?: string;
125
+ /** Triennial alternate Haftara number of verses */
126
+ triHaftaraNumV?: number;
127
+ };
128
+ export type Leyning = LeyningBase & LeyningParshaHaShavua & LeyningShabbatHoliday & LeyningWeekday;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/leyning",
3
- "version": "8.1.9",
3
+ "version": "8.2.1",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "keywords": [
6
6
  "hebcal",
@@ -22,7 +22,7 @@
22
22
  "exports": {
23
23
  "import": "./dist/index.mjs",
24
24
  "require": "./dist/index.cjs",
25
- "types": "./leyning.d.ts"
25
+ "types": "./dist/index.d.ts"
26
26
  },
27
27
  "repository": {
28
28
  "type": "git",
@@ -31,38 +31,45 @@
31
31
  "bugs": {
32
32
  "url": "https://github.com/hebcal/hebcal-leyning/issues"
33
33
  },
34
- "typings": "leyning.d.ts",
34
+ "typings": "dist/index.d.ts",
35
35
  "files": [
36
36
  "dist",
37
- "bin",
38
- "leyning.d.ts"
37
+ "bin"
39
38
  ],
40
39
  "bin": {
41
40
  "leyning-csv": "bin/leyning-csv"
42
41
  },
43
42
  "dependencies": {
44
- "@hebcal/core": "^5.3.2"
43
+ "@hebcal/core": "^5.4.6",
44
+ "tslib": "^2.6.3"
45
45
  },
46
46
  "scripts": {
47
47
  "build:rollup": "rollup -c",
48
- "build:json2js": "for f in src/*.json; do echo 'export default' > $f.js && cat $f >> $f.js; done",
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
  "readme": "npx jsdoc2md dist/index.js",
52
52
  "pretest": "npm run build",
53
- "test": "ava"
53
+ "test": "jest"
54
54
  },
55
55
  "license": "BSD-2-Clause",
56
56
  "devDependencies": {
57
- "@rollup/plugin-commonjs": "^25.0.7",
57
+ "@babel/preset-env": "^7.24.7",
58
+ "@babel/preset-typescript": "^7.24.7",
59
+ "@rollup/plugin-commonjs": "^26.0.1",
58
60
  "@rollup/plugin-json": "^6.1.0",
59
61
  "@rollup/plugin-node-resolve": "^15.2.3",
60
62
  "@rollup/plugin-terser": "^0.4.4",
61
- "ava": "^6.1.2",
63
+ "@rollup/plugin-typescript": "^11.1.6",
64
+ "@types/jest": "^29.5.12",
62
65
  "eslint": "^8.57.0",
63
66
  "eslint-config-google": "^0.14.0",
64
- "jsdoc": "^4.0.2",
67
+ "gts": "^5.3.1",
68
+ "jest": "^29.7.0",
69
+ "jsdoc": "^4.0.3",
65
70
  "jsdoc-to-markdown": "^8.0.1",
66
- "rollup": "^4.16.4"
71
+ "rollup": "^4.18.0",
72
+ "ts-jest": "^29.1.5",
73
+ "typescript": "^5.5.2"
67
74
  }
68
75
  }
package/leyning.d.ts DELETED
@@ -1,269 +0,0 @@
1
- /// <reference types="node"/>
2
-
3
- import {Event, HDate} from '@hebcal/core';
4
- import {WriteStream} from 'fs';
5
-
6
- declare module '@hebcal/leyning' {
7
- /**
8
- * Represents an aliyah
9
- */
10
- export type Aliyah = {
11
- /** Book (e.g. "Numbers") */
12
- k: string;
13
- /** beginning verse (e.g. "28:9") */
14
- b: string;
15
- /** ending verse (e.g. "28:15") */
16
- e: string;
17
- /** number of verses */
18
- v?: number;
19
- /** parsha number (1=Bereshit, 54=Vezot HaBracha) */
20
- p?: number;
21
- };
22
-
23
- export type StringMap = {
24
- [key: string]: string;
25
- }
26
-
27
- export type AliyotMap = {
28
- [key: string]: Aliyah;
29
- }
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
-
45
- /**
46
- * Leyning for a parsha hashavua or holiday
47
- */
48
- export type Leyning = {
49
- /** Name of the parsha hashavua or holiday */
50
- name: LeyningNames;
51
- /** An array of either 1 (regular) or 2 (doubled parsha). `undefined` for holiday readings */
52
- parsha?: string[];
53
- /** 1 for Bereshit, 2 for Noach, etc. `undefined` for holiday readings */
54
- parshaNum?: number;
55
- /** Such as `Genesis 1:1 - 6:8` */
56
- summary: string;
57
- /** Haftarah object */
58
- haft: Aliyah | Aliyah[];
59
- /** Haftarah, such as `Isaiah 42:5 – 43:11` */
60
- haftara: string;
61
- /** Number of verses in the Haftarah */
62
- haftaraNumV?: number;
63
- /** Haftarah object */
64
- seph?: Aliyah | Aliyah[];
65
- /** Haftarah for Sephardim, such as `Isaiah 42:5 - 42:21` */
66
- sephardic?: string;
67
- /** Number of verses in the Haftarah for Sephardim */
68
- sephardicNumV?: number;
69
- /** Map of aliyot `1` through `7` plus `M` for maftir */
70
- fullkriyah: AliyotMap;
71
- /** Optional map of weekday Torah Readings aliyot `1` through `3` for Monday and Thursday */
72
- weekday?: AliyotMap;
73
- /** Explanations for special readings, keyed by aliyah number, `M` for maftir or `haftara` for Haftarah */
74
- reason?: StringMap;
75
- /** Song of Songs is read on the sabbath of Passover week, the Book of Ruth on Shavuot, Lamentations on Tisha be-Av, Ecclesiastes on the sabbath of the week of Sukkoth, and the Book of Esther on Purim */
76
- megillah?: AliyotMap;
77
- };
78
-
79
- /**
80
- * Formats parsha as a string
81
- */
82
- export function parshaToString(parsha: string[]): string;
83
- /**
84
- * Makes a deep copy of the src object using JSON stringify and parse
85
- */
86
- export function clone(src: any): any;
87
- /**
88
- * Calculates the number of verses in an aliyah or haftara based on
89
- * the `b` (begin verse), `e` (end verse) and `k` (book).
90
- * Modifies `aliyah` by setting the `v` field.
91
- */
92
- export function calculateNumVerses(aliyah: Aliyah): number;
93
- /**
94
- * Returns the total number of verses in an array of Aliyah (or haftarah) objects
95
- */
96
- export function sumVerses(aliyot: Aliyah | Aliyah[]): number;
97
- /**
98
- * Summarizes an `AliyotMap` by collapsing all adjacent aliyot.
99
- * Finds any non-overlapping parts (e.g. special 7th aliyah or maftir)
100
- */
101
- export function makeLeyningParts(aliyot: AliyotMap): Aliyah[];
102
- /**
103
- * Returns a string representation of the leyning parts.
104
- * Separate verse ranges read from the same book are separated
105
- * by commas, e.g. `Isaiah 6:1-7:6, 9:5-6`.
106
- * Verse ranges from different books are separated by semicolons,
107
- * e.g. `Genesis 21:1-34; Numbers 29:1-6`.
108
- */
109
- export function makeSummaryFromParts(parts: Aliyah | Aliyah[]): string;
110
- export type SpecialReading = {
111
- aliyot: AliyotMap;
112
- reason: StringMap;
113
- haft: Aliyah | Aliyah[];
114
- seph?: Aliyah | Aliyah[];
115
- };
116
- /**
117
- * Determines if the regular parashat haShavua coincides with an event that requires
118
- * a special maftir or Haftara (for example Shabbat HaGadol, Shabbat Chanukah, Rosh
119
- * Chodesh or Machar Chodesh, etc.).
120
- *
121
- * If a special maftir occurs, modifies `aliyot` to replace `M` and sets `reason.M`
122
- * (and in some cases modifies the 6th and 7th aliyah, setting `reason['7']`).
123
- *
124
- * If a special Haftarah applies, returns the Haftarah object and sets `reason.haftara`.
125
- * If no special Haftarah, returns `undefined`
126
- */
127
- export function specialReadings2(parsha: string[], hd: HDate, il: boolean, aliyot: AliyotMap): SpecialReading;
128
- /**
129
- * Looks up leyning for a regular Shabbat, Monday/Thursday weekday or holiday.
130
- *
131
- * If `hdate` coincides with a holiday that has Torah reading, returns the
132
- * reading for that day (see {@link getLeyningForHoliday})
133
- *
134
- * Otherwise, if `hdate` is a Saturday, returns {@link getLeyningForParshaHaShavua}
135
- *
136
- * Otherwise, if `hdate` is a Monday or Thursday, returns {@link Leyning} for the
137
- * Parashat haShavua, containing only the `weekday` aliyot (no `fullkriyah`).
138
- *
139
- * Otherwise, returns `undefined`.
140
- * @param hdate Hebrew Date
141
- * @param il in Israel
142
- * @param wantarray to return an array of 0 or more readings
143
- * @returns map of aliyot
144
- */
145
- export function getLeyningOnDate(hdate: HDate, il: boolean, wantarray?: boolean): Leyning | Leyning[];
146
-
147
- /**
148
- * Makes a summary of the leyning, like "Genesis 6:9-11:32"
149
- */
150
- export function makeLeyningSummary(aliyot: AliyotMap): string;
151
-
152
- /**
153
- * Based on the event date, type and title, finds the relevant leyning key
154
- * @param ev - the Hebcal holiday event
155
- * @param [il] - true if Israel holiday scheme
156
- * @returns key to look up in holiday-reading.json
157
- */
158
- export function getLeyningKeyForEvent(ev: Event, il?: boolean): string;
159
-
160
- /**
161
- * Looks up leyning for a given holiday. Returns some
162
- * of full kriyah aliyot, special Maftir, special Haftarah
163
- * @param ev - the Hebcal event associated with this leyning
164
- * @param [il] - true if Israel holiday scheme
165
- * @returns map of aliyot
166
- */
167
- export function getLeyningForHoliday(ev: Event, il?: boolean): Leyning;
168
-
169
- /**
170
- * Looks up leyning for a given holiday key. Key should be an
171
- * (untranslated) string used in holiday-readings.json. Returns some
172
- * of full kriyah aliyot, special Maftir, special Haftarah
173
- * @param key - name from `holiday-readings.json` to find
174
- * @param [cholHaMoedDay] - `ev.cholHaMoedDay` or `undefined`
175
- * @param [il] - true if Israel holiday scheme
176
- * @returns map of aliyot
177
- */
178
- export function getLeyningForHolidayKey(key: string, cholHaMoedDay?: number, il?: boolean): Leyning;
179
-
180
- /**
181
- * Looks up leyning for a regular Shabbat parsha, including any special
182
- * maftir or Haftara.
183
- * @param ev - the Hebcal event associated with this leyning
184
- * @param [il] - in Israel
185
- * @returns map of aliyot
186
- */
187
- export function getLeyningForParshaHaShavua(ev: Event, il?: boolean): Leyning;
188
-
189
- /**
190
- * Looks up regular leyning for a weekly parsha with no special readings
191
- * @param parsha untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei']
192
- * @returns map of aliyot
193
- */
194
- export function getLeyningForParsha(parsha: string|string[]): Leyning;
195
-
196
- /**
197
- * Looks up Monday/Thursday aliyot for a regular parsha
198
- * @param parsha untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei']
199
- * @returns map of aliyot
200
- */
201
- export function getWeekdayReading(parsha: string|string[]): AliyotMap;
202
-
203
- /**
204
- * Formats an aliyah object like "Numbers 28:9 - 28:15"
205
- */
206
- export function formatAliyahWithBook(aliyah: Aliyah): string;
207
-
208
- /**
209
- * Formats an aliyah object like "Numbers 28:9-15"
210
- */
211
- export function formatAliyahShort(aliyah: Aliyah, showBook: boolean): string;
212
-
213
- /**
214
- * Names of the books of the Torah. BOOK[1] === 'Genesis'
215
- */
216
- export const BOOK: string[];
217
-
218
- export function writeFullKriyahCsv(stream: WriteStream, hyear: number, il: boolean): void;
219
- /**
220
- * Formats reading for CSV
221
- */
222
- export function writeCsvLines(stream: WriteStream, ev: Event, reading: Leyning, il: boolean, isParsha: boolean): void;
223
-
224
- export function writeHolidayMincha(stream: WriteStream, ev: Event, il: boolean): void;
225
-
226
- export interface StringToBoolMap {
227
- [key: string]: boolean;
228
- }
229
- export function getParshaDates(events: Event[]): StringToBoolMap;
230
-
231
- /**
232
- * Parsha metadata (underlying JSON object)
233
- */
234
- export type ParshaMeta = {
235
- /** 1 for Bereshit, 2 for Noach, etc. `undefined` for holiday readings */
236
- num: number;
237
- /** parsha name in Hebrew with niqud */
238
- hebrew: string;
239
- /** 1 for Genesis, 2 for Exodus, 5 for Deuteronomy */
240
- book: number;
241
- /** Haftarah object(s) */
242
- haft: Aliyah | Aliyah[];
243
- /** Haftarah object(s) for Sephardim */
244
- seph?: Aliyah | Aliyah[];
245
- /** Raw map of Shabbat aliyot `1` through `7` plus `M` for maftir */
246
- fullkriyah: {
247
- [key: string]: string[];
248
- };
249
- /** weekday - raw map of weekday Torah Readings aliyot `1` through `3` for Mon & Thu */
250
- weekday: {
251
- [key: string]: string[];
252
- };
253
- };
254
-
255
- /**
256
- * Returns raw parsha metadata
257
- */
258
- export function lookupParsha(parsha: string | string[]): ParshaMeta;
259
-
260
- /**
261
- * Is there a special festival Torah Reading for `holiday`?
262
- */
263
- export function hasFestival(holiday: string): boolean;
264
-
265
- /**
266
- * Returns the raw metadata for festival reading for `holiday`
267
- */
268
- export function lookupFestival(holiday: string): any;
269
- }