@hebcal/leyning
Advanced tools
Comparing version 3.4.0 to 3.5.0
@@ -37,6 +37,26 @@ /// <reference types="node"/> | ||
fullkriyah: AliyotMap; | ||
reason?: any; | ||
reason?: { | ||
[key: string]: string; | ||
}; | ||
}; | ||
/** | ||
* Represents triennial aliyot for a given date | ||
* @property aliyot - a map of aliyot 1-7 plus "M" | ||
* @property yearNum - year number, 0-2 | ||
* @property date - Shabbat date for when this parsha is read in this 3-year cycle | ||
* @property [readSeparately] - true if a double parsha is read separately in year `yearNum` | ||
* @property [date1] - Shabbat date of the first part of a read-separately aliyah pair | ||
* @property [date2] - Shabbat date of the second part of a read-separately aliyah pair | ||
*/ | ||
export type TriennialAliyot = { | ||
aliyot: AliyotMap; | ||
yearNum: number; | ||
date: Date; | ||
readSeparately?: boolean; | ||
date1?: Date; | ||
date2?: Date; | ||
}; | ||
/** | ||
* Based on the event date, type and title, finds the relevant leyning key | ||
@@ -86,3 +106,3 @@ * @param e - event | ||
constructor(hebrewYear: number); | ||
getReading(name: string, yearNum: number): any; | ||
getReading(parsha: string, yearNum: number): TriennialAliyot; | ||
getStartYear(): number; | ||
@@ -109,6 +129,7 @@ /** | ||
* Looks up triennial leyning for a regular Shabbat parsha. | ||
* @param e - the Hebcal event associated with this parsha | ||
* @returns map of aliyot | ||
* @param ev - the Hebcal event associated with this parsha | ||
* @param [context] returns a reading wrapper object which includes `date`, `yearNum` and `aliyot` | ||
* @returns a map of aliyot 1-7 plus "M" | ||
*/ | ||
export function getTriennialForParshaHaShavua(e: Event): AliyotMap; | ||
export function getTriennialForParshaHaShavua(ev: Event, context?: boolean): AliyotMap|TriennialAliyot; | ||
@@ -120,2 +141,10 @@ export const parshiyot: any; | ||
export function writeFullKriyahCsv(stream: WriteStream, hyear: number, il: boolean): void; | ||
/** | ||
* Makes Sefaria links by adding `href`, `verses` and `num` attributes to each aliyah. | ||
* CAUTION: Modifies the `aliyot` parameter instead of making a copy. | ||
* @param aliyot - aliyah map to decorate | ||
* @param showBook - display the book name in the `verses` field (e.g. for special Maftir) | ||
*/ | ||
export function addSefariaLinksToLeyning(aliyot: AliyotMap, showBook: boolean): void; | ||
} |
{ | ||
"name": "@hebcal/leyning", | ||
"version": "3.4.0", | ||
"version": "3.5.0", | ||
"author": "Michael J. Radwin (https://github.com/mjradwin)", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
122
README.md
@@ -55,2 +55,6 @@ # hebcal-leyning | ||
<dl> | ||
<dt><a href="#addSefariaLinksToLeyning">addSefariaLinksToLeyning(aliyot, showBook)</a></dt> | ||
<dd><p>Makes Sefaria links by adding <code>href</code>, <code>verses</code> and <code>num</code> attributes to each aliyah. | ||
CAUTION: Modifies the <code>aliyot</code> parameter instead of making a copy.</p> | ||
</dd> | ||
<dt><a href="#getLeyningKeyForEvent">getLeyningKeyForEvent(e, [il])</a> ⇒ <code>string</code></dt> | ||
@@ -60,6 +64,10 @@ <dd><p>Based on the event date, type and title, finds the relevant leyning key</p> | ||
<dt><a href="#getLeyningForHoliday">getLeyningForHoliday(e, [il])</a> ⇒ <code><a href="#Leyning">Leyning</a></code></dt> | ||
<dd><p>Looks up leyning for a given holiday name. Name should be an | ||
(untranslated) string used in holiday-readons.json. Returns some | ||
<dd><p>Looks up leyning for a given holiday. Returns some | ||
of full kriyah aliyot, special Maftir, special Haftarah</p> | ||
</dd> | ||
<dt><a href="#getLeyningForHolidayKey">getLeyningForHolidayKey(key)</a> ⇒ <code><a href="#Leyning">Leyning</a></code></dt> | ||
<dd><p>Looks up leyning for a given holiday key. Key should be an | ||
(untranslated) string used in holiday-readings.json. Returns some | ||
of full kriyah aliyot, special Maftir, special Haftarah</p> | ||
</dd> | ||
<dt><a href="#parshaToString">parshaToString(parsha)</a> ⇒ <code>string</code></dt> | ||
@@ -89,2 +97,5 @@ <dd><p>Formats parsha as a string</p> | ||
</dd> | ||
<dt><a href="#getTriennialForParshaHaShavua">getTriennialForParshaHaShavua(ev, [context])</a> ⇒ <code><a href="#TriennialAliyot">TriennialAliyot</a></code> | <code>Object.<string, Aliyah></code></dt> | ||
<dd><p>Looks up the triennial leyning for this Parashat HaShavua</p> | ||
</dd> | ||
</dl> | ||
@@ -101,2 +112,5 @@ | ||
</dd> | ||
<dt><a href="#TriennialAliyot">TriennialAliyot</a> : <code>Object</code></dt> | ||
<dd><p>Represents triennial aliyot for a given date</p> | ||
</dd> | ||
</dl> | ||
@@ -114,5 +128,4 @@ | ||
* _instance_ | ||
* [.getReadings()](#Triennial+getReadings) ⇒ <code>Object</code> | ||
* [.getReading(parsha, yearNum)](#Triennial+getReading) ⇒ <code>Object.<string, Aliyah></code> | ||
* [.getStartYear()](#Triennial+getStartYear) ⇒ <code>number</code> | ||
* [.getLeyningForParshaHaShavua(ev)](#Triennial+getLeyningForParshaHaShavua) ⇒ [<code>Aliyah</code>](#Aliyah) | ||
* [.getThreeYearPattern(id)](#Triennial+getThreeYearPattern) ⇒ <code>string</code> | ||
@@ -137,6 +150,13 @@ * [.cycleReadings(cycleOption)](#Triennial+cycleReadings) ⇒ <code>Map.<string, Array.<Object>></code> | ||
<a name="Triennial+getReadings"></a> | ||
<a name="Triennial+getReading"></a> | ||
### triennial.getReadings() ⇒ <code>Object</code> | ||
### triennial.getReading(parsha, yearNum) ⇒ <code>Object.<string, Aliyah></code> | ||
**Kind**: instance method of [<code>Triennial</code>](#Triennial) | ||
**Returns**: <code>Object.<string, Aliyah></code> - a map of aliyot 1-7 plus "M" | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| parsha | <code>string</code> | parsha name ("Bereshit" or "Achrei Mot-Kedoshim") | | ||
| yearNum | <code>number</code> | 0 through 2 for which year of Triennial cycle | | ||
<a name="Triennial+getStartYear"></a> | ||
@@ -146,13 +166,2 @@ | ||
**Kind**: instance method of [<code>Triennial</code>](#Triennial) | ||
<a name="Triennial+getLeyningForParshaHaShavua"></a> | ||
### triennial.getLeyningForParshaHaShavua(ev) ⇒ [<code>Aliyah</code>](#Aliyah) | ||
Looks up the leyning for this Parashat HaShavua | ||
**Kind**: instance method of [<code>Triennial</code>](#Triennial) | ||
| Param | Type | | ||
| --- | --- | | ||
| ev | <code>Event</code> | | ||
<a name="Triennial+getThreeYearPattern"></a> | ||
@@ -240,2 +249,15 @@ | ||
**Kind**: global constant | ||
<a name="addSefariaLinksToLeyning"></a> | ||
## addSefariaLinksToLeyning(aliyot, showBook) | ||
Makes Sefaria links by adding `href`, `verses` and `num` attributes to each aliyah. | ||
CAUTION: Modifies the `aliyot` parameter instead of making a copy. | ||
**Kind**: global function | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| aliyot | <code>Object.<string, Aliyah></code> | aliyah map to decorate | | ||
| showBook | <code>boolean</code> | display the book name in the `verses` field (e.g. for special Maftir) | | ||
<a name="getLeyningKeyForEvent"></a> | ||
@@ -249,6 +271,6 @@ | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| e | <code>Event</code> | event | | ||
| [il] | <code>boolean</code> | true if Israel holiday scheme | | ||
| Param | Type | Default | Description | | ||
| --- | --- | --- | --- | | ||
| e | <code>Event</code> | | event | | ||
| [il] | <code>boolean</code> | <code>false</code> | true if Israel holiday scheme | | ||
@@ -258,4 +280,3 @@ <a name="getLeyningForHoliday"></a> | ||
## getLeyningForHoliday(e, [il]) ⇒ [<code>Leyning</code>](#Leyning) | ||
Looks up leyning for a given holiday name. Name should be an | ||
(untranslated) string used in holiday-readons.json. Returns some | ||
Looks up leyning for a given holiday. Returns some | ||
of full kriyah aliyot, special Maftir, special Haftarah | ||
@@ -266,6 +287,20 @@ | ||
| Param | Type | Default | Description | | ||
| --- | --- | --- | --- | | ||
| e | <code>Event</code> | | the Hebcal event associated with this leyning | | ||
| [il] | <code>boolean</code> | <code>false</code> | true if Israel holiday scheme | | ||
<a name="getLeyningForHolidayKey"></a> | ||
## getLeyningForHolidayKey(key) ⇒ [<code>Leyning</code>](#Leyning) | ||
Looks up leyning for a given holiday key. Key should be an | ||
(untranslated) string used in holiday-readings.json. Returns some | ||
of full kriyah aliyot, special Maftir, special Haftarah | ||
**Kind**: global function | ||
**Returns**: [<code>Leyning</code>](#Leyning) - map of aliyot | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| e | <code>Event</code> | the Hebcal event associated with this leyning | | ||
| [il] | <code>boolean</code> | true if Israel holiday scheme | | ||
| key | <code>string</code> | name from `holiday-readings.json` to find | | ||
@@ -325,6 +360,6 @@ <a name="parshaToString"></a> | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| e | <code>Event</code> | the Hebcal event associated with this leyning | | ||
| [il] | <code>boolean</code> | in Israel | | ||
| Param | Type | Default | Description | | ||
| --- | --- | --- | --- | | ||
| e | <code>Event</code> | | the Hebcal event associated with this leyning | | ||
| [il] | <code>boolean</code> | <code>false</code> | in Israel | | ||
@@ -364,2 +399,15 @@ <a name="formatAliyahWithBook"></a> | ||
<a name="getTriennialForParshaHaShavua"></a> | ||
## getTriennialForParshaHaShavua(ev, [context]) ⇒ [<code>TriennialAliyot</code>](#TriennialAliyot) \| <code>Object.<string, Aliyah></code> | ||
Looks up the triennial leyning for this Parashat HaShavua | ||
**Kind**: global function | ||
**Returns**: [<code>TriennialAliyot</code>](#TriennialAliyot) \| <code>Object.<string, Aliyah></code> - a map of aliyot 1-7 plus "M" | ||
| Param | Type | Default | Description | | ||
| --- | --- | --- | --- | | ||
| ev | <code>Event</code> | | | | ||
| [context] | <code>boolean</code> | <code>false</code> | returns a reading wrapper object which includes `date`, `yearNum` and `aliyot` | | ||
<a name="Aliyah"></a> | ||
@@ -397,1 +445,17 @@ | ||
<a name="TriennialAliyot"></a> | ||
## TriennialAliyot : <code>Object</code> | ||
Represents triennial aliyot for a given date | ||
**Kind**: global typedef | ||
**Properties** | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| aliyot | <code>Object.<string, Aliyah></code> | a map of aliyot 1-7 plus "M" | | ||
| yearNum | <code>number</code> | year number, 0-2 | | ||
| date | <code>Date</code> | Shabbat date for when this parsha is read in this 3-year cycle | | ||
| [readSeparately] | <code>boolean</code> | true if a double parsha is read separately in year `yearNum` | | ||
| [date1] | <code>Date</code> | Shabbat date of the first part of a read-separately aliyah pair | | ||
| [date2] | <code>Date</code> | Shabbat date of the second part of a read-separately aliyah pair | |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
506242
5394
448