@hebcal/leyning 4.10.0 → 4.10.5

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 CHANGED
@@ -55,7 +55,7 @@ for (const [num, aliyah] of Object.entries(triReading)) {
55
55
  ## Functions
56
56
 
57
57
  <dl>
58
- <dt><a href="#addSefariaLinksToLeyning">addSefariaLinksToLeyning(aliyot, showBook)</a></dt>
58
+ <dt><del><a href="#addSefariaLinksToLeyning">addSefariaLinksToLeyning(aliyot, showBook)</a></del></dt>
59
59
  <dd><p>Makes Sefaria links by adding <code>href</code>, <code>verses</code> and <code>num</code> attributes to each aliyah.
60
60
  CAUTION: Modifies the <code>aliyot</code> parameter instead of making a copy.</p>
61
61
  </dd>
@@ -67,21 +67,13 @@ CAUTION: Modifies the <code>aliyot</code> parameter instead of making a copy.</p
67
67
  of full kriyah aliyot, special Maftir, special Haftarah</p>
68
68
  </dd>
69
69
  <dt><a href="#makeLeyningSummary">makeLeyningSummary(aliyot)</a> ⇒ <code>string</code></dt>
70
- <dd></dd>
70
+ <dd><p>Makes a summary of the leyning, like &quot;Genesis 6:9-11:32&quot;</p>
71
+ </dd>
71
72
  <dt><a href="#getLeyningForHolidayKey">getLeyningForHolidayKey(key)</a> ⇒ <code><a href="#Leyning">Leyning</a></code></dt>
72
73
  <dd><p>Looks up leyning for a given holiday key. Key should be an
73
74
  (untranslated) string used in holiday-readings.json. Returns some
74
75
  of full kriyah aliyot, special Maftir, special Haftarah</p>
75
76
  </dd>
76
- <dt><a href="#getHaftaraKey">getHaftaraKey(parsha)</a> ⇒ <code>string</code></dt>
77
- <dd><p>on doubled parshiot, read only the second Haftarah
78
- except for Nitzavim-Vayelech</p>
79
- </dd>
80
- <dt><a href="#getChanukahShabbatKey">getChanukahShabbatKey(e, key)</a> ⇒ <code>string</code></dt>
81
- <dd></dd>
82
- <dt><a href="#getHolidayEvents">getHolidayEvents(hd, il)</a> ⇒ <code>Array.&lt;Event&gt;</code></dt>
83
- <dd><p>Filters out Rosh Chodesh and events that don&#39;t occur in this location</p>
84
- </dd>
85
77
  <dt><a href="#getLeyningForParsha">getLeyningForParsha(parsha)</a> ⇒ <code><a href="#Leyning">Leyning</a></code></dt>
86
78
  <dd><p>Looks up regular leyning for a weekly parsha with no special readings</p>
87
79
  </dd>
@@ -94,9 +86,6 @@ except for Nitzavim-Vayelech</p>
94
86
  <dt><a href="#formatAliyahShort">formatAliyahShort(aliyah, showBook)</a> ⇒ <code>string</code></dt>
95
87
  <dd><p>Formats an aliyah object like &quot;Numbers 28:9-15&quot;</p>
96
88
  </dd>
97
- <dt><a href="#getDoubledName">getDoubledName(id)</a> ⇒ <code>string</code></dt>
98
- <dd><p>takes a 0-based (Bereshit=0) parsha ID</p>
99
- </dd>
100
89
  <dt><a href="#getTriennial">getTriennial(year)</a> ⇒ <code><a href="#Triennial">Triennial</a></code></dt>
101
90
  <dd><p>Calculates the 3-year readings for a given year</p>
102
91
  </dd>
@@ -131,6 +120,7 @@ Triennial Torah readings
131
120
  * _instance_
132
121
  * [.getReading(parsha, yearNum)](#Triennial+getReading) ⇒ <code>Object.&lt;string, Aliyah&gt;</code>
133
122
  * [.getStartYear()](#Triennial+getStartYear) ⇒ <code>number</code>
123
+ * [.debug()](#Triennial+debug) ⇒ <code>string</code>
134
124
  * _static_
135
125
  * [.getYearNumber(year)](#Triennial.getYearNumber) ⇒ <code>number</code>
136
126
  * [.getCycleStartYear(year)](#Triennial.getCycleStartYear) ⇒ <code>number</code>
@@ -160,6 +150,10 @@ Builds a Triennial object
160
150
 
161
151
  ### triennial.getStartYear() ⇒ <code>number</code>
162
152
  **Kind**: instance method of [<code>Triennial</code>](#Triennial)
153
+ <a name="Triennial+debug"></a>
154
+
155
+ ### triennial.debug() ⇒ <code>string</code>
156
+ **Kind**: instance method of [<code>Triennial</code>](#Triennial)
163
157
  <a name="Triennial.getYearNumber"></a>
164
158
 
165
159
  ### Triennial.getYearNumber(year) ⇒ <code>number</code>
@@ -190,7 +184,9 @@ Names of the books of the Torah. BOOK[1] === 'Genesis'
190
184
  **Kind**: global constant
191
185
  <a name="addSefariaLinksToLeyning"></a>
192
186
 
193
- ## addSefariaLinksToLeyning(aliyot, showBook)
187
+ ## ~~addSefariaLinksToLeyning(aliyot, showBook)~~
188
+ ***Deprecated***
189
+
194
190
  Makes Sefaria links by adding `href`, `verses` and `num` attributes to each aliyah.
195
191
  CAUTION: Modifies the `aliyot` parameter instead of making a copy.
196
192
 
@@ -231,6 +227,8 @@ of full kriyah aliyot, special Maftir, special Haftarah
231
227
  <a name="makeLeyningSummary"></a>
232
228
 
233
229
  ## makeLeyningSummary(aliyot) ⇒ <code>string</code>
230
+ Makes a summary of the leyning, like "Genesis 6:9-11:32"
231
+
234
232
  **Kind**: global function
235
233
 
236
234
  | Param | Type |
@@ -251,40 +249,6 @@ of full kriyah aliyot, special Maftir, special Haftarah
251
249
  | --- | --- | --- |
252
250
  | key | <code>string</code> | name from `holiday-readings.json` to find |
253
251
 
254
- <a name="getHaftaraKey"></a>
255
-
256
- ## getHaftaraKey(parsha) ⇒ <code>string</code>
257
- on doubled parshiot, read only the second Haftarah
258
- except for Nitzavim-Vayelech
259
-
260
- **Kind**: global function
261
-
262
- | Param | Type |
263
- | --- | --- |
264
- | parsha | <code>Array.&lt;string&gt;</code> |
265
-
266
- <a name="getChanukahShabbatKey"></a>
267
-
268
- ## getChanukahShabbatKey(e, key) ⇒ <code>string</code>
269
- **Kind**: global function
270
-
271
- | Param | Type |
272
- | --- | --- |
273
- | e | <code>Event</code> |
274
- | key | <code>string</code> |
275
-
276
- <a name="getHolidayEvents"></a>
277
-
278
- ## getHolidayEvents(hd, il) ⇒ <code>Array.&lt;Event&gt;</code>
279
- Filters out Rosh Chodesh and events that don't occur in this location
280
-
281
- **Kind**: global function
282
-
283
- | Param | Type | Description |
284
- | --- | --- | --- |
285
- | hd | <code>HDate</code> | Hebrew date |
286
- | il | <code>boolean</code> | in Israel |
287
-
288
252
  <a name="getLeyningForParsha"></a>
289
253
 
290
254
  ## getLeyningForParsha(parsha) ⇒ [<code>Leyning</code>](#Leyning)
@@ -297,6 +261,10 @@ Looks up regular leyning for a weekly parsha with no special readings
297
261
  | --- | --- | --- |
298
262
  | parsha | <code>string</code> \| <code>Array.&lt;string&gt;</code> | untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei'] |
299
263
 
264
+ <a name="getLeyningForParsha..result"></a>
265
+
266
+ ### getLeyningForParsha~result : [<code>Leyning</code>](#Leyning)
267
+ **Kind**: inner constant of [<code>getLeyningForParsha</code>](#getLeyningForParsha)
300
268
  <a name="getLeyningForParshaHaShavua"></a>
301
269
 
302
270
  ## getLeyningForParshaHaShavua(ev, [il]) ⇒ [<code>Leyning</code>](#Leyning)
@@ -333,17 +301,6 @@ Formats an aliyah object like "Numbers 28:9-15"
333
301
  | aliyah | [<code>Aliyah</code>](#Aliyah) |
334
302
  | showBook | <code>boolean</code> |
335
303
 
336
- <a name="getDoubledName"></a>
337
-
338
- ## getDoubledName(id) ⇒ <code>string</code>
339
- takes a 0-based (Bereshit=0) parsha ID
340
-
341
- **Kind**: global function
342
-
343
- | Param | Type |
344
- | --- | --- |
345
- | id | <code>number</code> |
346
-
347
304
  <a name="getTriennial"></a>
348
305
 
349
306
  ## getTriennial(year) ⇒ [<code>Triennial</code>](#Triennial)
@@ -396,8 +353,11 @@ Leyning for a parsha hashavua or holiday
396
353
  | --- | --- | --- |
397
354
  | summary | <code>string</code> | |
398
355
  | haftara | <code>string</code> | Haftarah |
399
- | sephardic | <code>string</code> | Haftarah for Sephardic |
356
+ | [haftaraNumV] | <code>number</code> | |
357
+ | [sephardic] | <code>string</code> | Haftarah for Sephardic |
358
+ | [sephardicNumV] | <code>number</code> | |
400
359
  | fullkriyah | <code>Object.&lt;string, Aliyah&gt;</code> | |
360
+ | [weekday] | <code>Object.&lt;string, Aliyah&gt;</code> | |
401
361
  | [reason] | <code>Object</code> | |
402
362
 
403
363
  <a name="TriennialAliyot"></a>