Socket
Socket
Sign inDemoInstall

@hebcal/leyning

Package Overview
Dependencies
Maintainers
1
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hebcal/leyning - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

13

leyning.d.ts

@@ -22,2 +22,6 @@ /// <reference types="node"/>

export type AliyotMap = {
[key: string]: Aliyah;
}
/**

@@ -32,3 +36,3 @@ * Leyning for a parsha hashavua or holiday

sephardic?: string;
fullkriyah: Map<string, Aliyah>;
fullkriyah: AliyotMap;
reason?: any;

@@ -93,2 +97,9 @@ };

export function getTriennial(year: number): Triennial;
/**
* Looks up triennial leyning for a regular Shabbat parsha.
* @param e - the Hebcal event associated with this parsha
* @returns map of aliyot
*/
export function getTriennialForParshaHaShavua(e: Event): AliyotMap;
}

5

package.json
{
"name": "@hebcal/leyning",
"version": "1.1.0",
"version": "1.1.1",
"author": "Michael J. Radwin (https://github.com/mjradwin)",

@@ -12,4 +12,3 @@ "keywords": [

"main": "./dist/index.js",
"module": "./dist/index.esm.js",
"browser": "./dist/index.umd.js",
"browser": "./dist/bundle.min.js",
"repository": {

@@ -16,0 +15,0 @@ "type": "git",

@@ -16,4 +16,20 @@ # hebcal-leyning

const events = hebcal.hebrewCalendar(options);
const ev = events.find((e) => e.getDesc() == 'Parashat Pinchas');
const aliyot = leyning.getLeyningForParshaHaShavua(ev);
const ev = events.find((ev) => ev.getDesc() == 'Parashat Pinchas');
const reading = leyning.getLeyningForParshaHaShavua(ev);
console.log(`${ev.getDesc()}: ${reading.summary}`);
console.log(`Haftara: ${reading.haftara}`);
for (const [num, aliyah] of Object.entries(reading.fullkriyah)) {
const number = num == 'M' ? 'maftir' : `aliyah ${num}`;
let str = leyning.formatAliyahWithBook(aliyah);
if (reading.reason[num]) {
str += ' | ' + reading.reason[num];
}
console.log(`${number}: ${str}`);
}
const triReading = triennial.getTriennialForParshaHaShavua(ev);
for (const [num, aliyah] of Object.entries(triReading)) {
const number = num == 'M' ? 'maftir' : `aliyah ${num}`;
const str = leyning.formatAliyahWithBook(aliyah);
console.log(`Triennial ${number}: ${str}`);
}
```

@@ -29,2 +45,10 @@

## Constants
<dl>
<dt><a href="#leyning">leyning</a></dt>
<dd><p>Main interface to hebcal/leyning</p>
</dd>
</dl>
## Functions

@@ -86,6 +110,7 @@

* [Triennial](#Triennial)
* [new Triennial([hebrewYear], [aliyot])](#new_Triennial_new)
* [new Triennial([hebrewYear])](#new_Triennial_new)
* _instance_
* [.getReadings()](#Triennial+getReadings) ⇒ <code>Object</code>
* [.getStartYear()](#Triennial+getStartYear) ⇒ <code>number</code>
* [.getLeyningForParshaHaShavua(ev)](#Triennial+getLeyningForParshaHaShavua) ⇒ [<code>Aliyah</code>](#Aliyah)
* [.getThreeYearPattern(id)](#Triennial+getThreeYearPattern) ⇒ <code>string</code>

@@ -102,3 +127,3 @@ * [.cycleReadings(cycleOption)](#Triennial+cycleReadings) ⇒ <code>Map.&lt;string, Array.&lt;Object&gt;&gt;</code>

### new Triennial([hebrewYear], [aliyot])
### new Triennial([hebrewYear])
Builds a Triennial object

@@ -110,3 +135,2 @@

| [hebrewYear] | <code>number</code> | Hebrew Year (default current year) |
| [aliyot] | <code>Object</code> | aliyot.json object |

@@ -121,2 +145,13 @@ <a name="Triennial+getReadings"></a>

**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>

@@ -137,3 +172,3 @@

### triennial.cycleReadings(cycleOption) ⇒ <code>Map.&lt;string, Array.&lt;Object&gt;&gt;</code>
Builds a lookup table readings["Bereshit"][1], readings["Matot-Masei"][3]
Builds a lookup table readings["Bereshit"][0], readings["Matot-Masei"][2]

@@ -199,2 +234,8 @@ **Kind**: instance method of [<code>Triennial</code>](#Triennial)

<a name="leyning"></a>
## leyning
Main interface to hebcal/leyning
**Kind**: global constant
<a name="getLeyningKeyForEvent"></a>

@@ -284,3 +325,3 @@

| e | <code>Event</code> | the Hebcal event associated with this leyning |
| [il] | <code>booleam</code> | in Israel |
| [il] | <code>boolean</code> | in Israel |

@@ -348,4 +389,5 @@ <a name="formatAliyahWithBook"></a>

| haftara | <code>string</code> | Haftarah |
| fullkriyah | <code>Map.&lt;string, Aliyah&gt;</code> | |
| sephardic | <code>string</code> | Haftarah for Sephardic |
| fullkriyah | <code>Object.&lt;string, Aliyah&gt;</code> | |
| [reason] | <code>Object</code> | |

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc