@hebcal/icalendar
Advanced tools
Comparing version 4.6.0 to 4.6.1
@@ -1,2 +0,2 @@ | ||
/*! @hebcal/icalendar v4.6.0 */ | ||
/*! @hebcal/icalendar v4.6.1 */ | ||
'use strict'; | ||
@@ -7,10 +7,31 @@ | ||
var core = require('@hebcal/core'); | ||
var leyning = require('@hebcal/leyning'); | ||
var leyn = require('@hebcal/leyning'); | ||
var fs = require('fs'); | ||
function createCommonjsModule(fn) { | ||
var module = { exports: {} }; | ||
return fn(module, module.exports), module.exports; | ||
function _interopNamespace(e) { | ||
if (e && e.__esModule) return e; | ||
var n = Object.create(null); | ||
if (e) { | ||
Object.keys(e).forEach(function (k) { | ||
if (k !== 'default') { | ||
var d = Object.getOwnPropertyDescriptor(e, k); | ||
Object.defineProperty(n, k, d.get ? d : { | ||
enumerable: true, | ||
get: function () { | ||
return e[k]; | ||
} | ||
}); | ||
} | ||
}); | ||
} | ||
n['default'] = e; | ||
return Object.freeze(n); | ||
} | ||
var leyn__namespace = /*#__PURE__*/_interopNamespace(leyn); | ||
var murmurhashJs = {exports: {}}; | ||
var murmurhash3_gc = {exports: {}}; | ||
/** | ||
@@ -29,3 +50,3 @@ * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011) | ||
var murmurhash3_gc = createCommonjsModule(function (module) { | ||
(function (module) { | ||
function murmurhash3_32_gc(key, seed) { | ||
@@ -86,4 +107,6 @@ var remainder, bytes, h1, h1b, c1, c2, k1, i; | ||
} | ||
}); | ||
}(murmurhash3_gc)); | ||
var murmurhash2_gc = {exports: {}}; | ||
/** | ||
@@ -102,3 +125,3 @@ * JS Implementation of MurmurHash2 | ||
var murmurhash2_gc = createCommonjsModule(function (module) { | ||
(function (module) { | ||
function murmurhash2_32_gc(str, seed) { | ||
@@ -145,12 +168,13 @@ var | ||
} | ||
}); | ||
}(murmurhash2_gc)); | ||
var murmurhashJs = murmurhash3_gc; | ||
var murmur3_1 = murmurhash3_gc; | ||
var murmur2_1 = murmurhash2_gc; | ||
murmurhashJs.murmur3 = murmur3_1; | ||
murmurhashJs.murmur2 = murmur2_1; | ||
var murmur3 = murmurhash3_gc.exports; | ||
var murmur2 = murmurhash2_gc.exports; | ||
/*! @hebcal/rest-api v3.3.3 */ | ||
murmurhashJs.exports = murmur3; | ||
var murmur3_1 = murmurhashJs.exports.murmur3 = murmur3; | ||
murmurhashJs.exports.murmur2 = murmur2; | ||
/*! @hebcal/rest-api v3.6.0 */ | ||
var Chanukah="Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights";var Pesach="Passover, the Feast of Unleavened Bread. Also called Chag HaMatzot (the Festival of Matzah), it commemorates the Exodus and freedom of the Israelites from ancient Egypt";var Purim="Celebration of Jewish deliverance as told by Megilat Esther. It commemorates a time when the Jewish people living in Persia were saved from extermination";var Shavuot="Festival of Weeks. Commemorates the giving of the Torah at Mount Sinai";var Sigd="Ethiopian Jewish holiday occurring 50 days after Yom Kippur";var Sukkot="Feast of Booths";var holidayDescription = {"Asara B'Tevet":"Fast commemorating the siege of Jerusalem",Chanukah:Chanukah,"Days of the Omer":"7 weeks from the second night of Pesach to the day before Shavuot","Lag BaOmer":"33rd day of counting the Omer","Leil Selichot":"Prayers for forgiveness in preparation for the High Holidays","Pesach Sheni":"Second Passover, one month after Passover",Pesach:Pesach,"Purim Katan":"Minor Purim celebration during Adar I on leap years",Purim:Purim,"Rosh Chodesh Nisan":"Start of month of Nisan on the Hebrew calendar. נִיסָן (transliterated Nisan or Nissan) is the 1st month of the Hebrew year, has 30 days, and corresponds to March or April on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Iyyar":"Start of month of Iyyar on the Hebrew calendar. אִיָיר (transliterated Iyyar or Iyar) is the 2nd month of the Hebrew year, has 29 days, and corresponds to April or May on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sivan":"Start of month of Sivan on the Hebrew calendar. Sivan (סִיוָן) is the 3rd month of the Hebrew year, has 30 days, and corresponds to May or June on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tamuz":"Start of month of Tamuz on the Hebrew calendar. תַּמּוּז (transliterated Tamuz or Tammuz) is the 4th month of the Hebrew year, has 29 days, and corresponds to June or July on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Av":"Start of month of Av on the Hebrew calendar. Av (אָב) is the 5th month of the Hebrew year, has 30 days, and corresponds to July or August on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Elul":"Start of month of Elul on the Hebrew calendar. Elul (אֱלוּל) is the 6th month of the Hebrew year, has 29 days, and corresponds to August or September on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Cheshvan":"Start of month of Cheshvan on the Hebrew calendar. חֶשְׁוָן (transliterated Cheshvan or Heshvan) is the 8th month of the Hebrew year, has 29 or 30 days, and corresponds to October or November on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Kislev":"Start of month of Kislev on the Hebrew calendar. Kislev (כִּסְלֵו) is the 9th month of the Hebrew year, has 30 or 29 days, and corresponds to November or December on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tevet":"Start of month of Tevet on the Hebrew calendar. Tevet (טֵבֵת) is the 10th month of the Hebrew year, has 29 days, and corresponds to December or January on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sh'vat":"Start of month of Sh'vat on the Hebrew calendar. שְׁבָט (transliterated Sh'vat or Shevat) is the 11th month of the Hebrew year, has 30 days, and corresponds to January or February on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar":"Start of month of Adar on the Hebrew calendar. Adar (אַדָר) is the 12th month of the Hebrew year, has 29 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar I":"Start of month of Adar I (on leap years) on the Hebrew calendar. Adar I (אַדָר א׳) is the 12th month of the Hebrew year, occurs only on leap years, has 30 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar II":"Start of month of Adar II (on leap years) on the Hebrew calendar. Adar II (אַדָר ב׳), sometimes \"Adar Bet\" or \"Adar Sheni\", is the 13th month of the Hebrew year, has 29 days, occurs only on leap years, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Hashana":"The Jewish New Year. Also spelled Rosh Hashanah","Shabbat Chazon":"Shabbat before Tish'a B'Av (Shabbat of Prophecy/Shabbat of Vision)","Shabbat HaChodesh":"Shabbat before Rosh Chodesh Nissan","Shabbat HaGadol":"Shabbat before Pesach","Shabbat Machar Chodesh":"When Shabbat falls the day before Rosh Chodesh","Shabbat Nachamu":"Shabbat after Tish'a B'Av (Shabbat of Consolation). The first of seven Shabbatot leading up to Rosh Hashanah. Named after the Haftarah (from Isaiah 40) which begins with the verse נַחֲמוּ נַחֲמוּ, עַמִּי (\"Comfort, oh comfort my people\")","Shabbat Parah":"Shabbat of the Red Heifer","Shabbat Rosh Chodesh":"When Shabbat falls on Rosh Chodesh","Shabbat Shekalim":"Shabbat before Rosh Chodesh Adar","Shabbat Shirah":"Shabbat of Song","Shabbat Shuva":"Shabbat that falls between Rosh Hashanah and Yom Kippur (Shabbat of Returning)","Shabbat Zachor":"Shabbat before Purim",Shavuot:Shavuot,"Shmini Atzeret":"Eighth Day of Assembly","Shushan Purim":"Purim celebrated in Jerusalem and walled cities",Sigd:Sigd,"Simchat Torah":"Day of Celebrating the Torah",Sukkot:Sukkot,"Ta'anit Bechorot":"Fast of the First Born","Ta'anit Esther":"Fast of Esther","Tish'a B'Av":"The Ninth of Av. Fast commemorating the destruction of the two Temples","Tu B'Av":"Minor Jewish holiday of love. Observed on the 15th day of the Hebrew month of Av","Tu BiShvat":"New Year for Trees","Tzom Gedaliah":"Fast of the Seventh Month. Commemorates the assassination of the Jewish governor of Judah","Tzom Tammuz":"Fast commemorating breaching of the walls of Jerusalem before the destruction of the Second Temple","Yom HaAliyah":"Recognizes Aliyah, immigration to the Jewish State of Israel","Yom HaAtzma'ut":"Israeli Independence Day. Commemorates the declaration of independence of Israel in 1948. Note that Hebcal displays modern holidays like Yom HaAtzma'ut according to the Israeli schedule. Although Yom HaAtzma'ut is normally observed on the 5th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaZikaron, which always precedes it) would conflict with Shabbat","Yom HaShoah":"Holocaust Memorial Day","Yom HaZikaron":"Israeli Memorial Day. Note that Hebcal displays modern holidays like Yom HaZikaron according to the Israeli schedule. Although Yom Hazikaron is normally observed on the 4th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaAtzma'ut, which always follows it) would conflict with Shabbat","Yom Kippur":"Day of Atonement","Yom Yerushalayim":"Jerusalem Day. Commemorates the re-unification of Jerusalem in 1967"}; | ||
@@ -188,3 +212,5 @@ | ||
function pad4(number) { | ||
if (number < 10) { | ||
if (number < 0) { | ||
return '-00' + pad4(-number); | ||
} else if (number < 10) { | ||
return '000' + number; | ||
@@ -359,7 +385,7 @@ } else if (number < 100) { | ||
if (mask & core.flags.PARSHA_HASHAVUA) { | ||
reading = leyning.getLeyningForParshaHaShavua(ev, il); | ||
reading = leyn__namespace.getLeyningForParshaHaShavua(ev, il); | ||
memo = `Torah: ${reading.summary}`; | ||
if (reading.reason) { | ||
for (const num of ['7', 'M']) { | ||
['7', 'M'].forEach(num => { | ||
const special = reading.reason[num]; | ||
@@ -369,6 +395,6 @@ | ||
const aname = num === '7' ? '7th aliyah' : 'Maftir'; | ||
const verses = leyning.formatAliyahWithBook(reading.fullkriyah[num]); | ||
const verses = leyn__namespace.formatAliyahWithBook(reading.fullkriyah[num]); | ||
memo += `\n${aname}: ${verses} | ${special}`; | ||
} | ||
} | ||
}); | ||
} | ||
@@ -384,3 +410,3 @@ | ||
} else { | ||
reading = leyning.getLeyningForHoliday(ev, il); | ||
reading = leyn__namespace.getLeyningForHoliday(ev, il); | ||
@@ -410,5 +436,25 @@ if (reading && (reading.summary || reading.haftara)) { | ||
} | ||
/** | ||
* Appends utm_source and utm_medium parameters to a URL | ||
* @param {string} url | ||
* @param {boolean} il | ||
* @param {string} utmSource | ||
* @param {string} utmMedium | ||
* @return {string} | ||
*/ | ||
var version="4.6.0"; | ||
function appendIsraelAndTracking(url, il, utmSource, utmMedium) { | ||
if (url.substring(0, 22) !== 'https://www.hebcal.com') { | ||
utmSource = 'hebcal.com'; | ||
} else if (il && url.indexOf('?') === -1) { | ||
url += '?i=on'; | ||
} | ||
const sep = url.indexOf('?') === -1 ? '?' : '&'; | ||
const utm = `utm_source=${utmSource}&utm_medium=${utmMedium}`; | ||
return url + sep + utm; | ||
} | ||
var version="4.6.1"; | ||
const VTIMEZONE = {}; | ||
@@ -451,11 +497,3 @@ const CATEGORY = { | ||
function appendTrackingToUrl(url, il) { | ||
if (!url) { | ||
return url; | ||
} else if (url.startsWith('https://www.hebcal.com')) { | ||
const suffix = il ? 'i=on&' : ''; | ||
return `${url}?${suffix}utm_source=js&utm_medium=icalendar`; | ||
} else { | ||
const sep = url.indexOf('?') == -1 ? '?' : '&'; | ||
return url + sep + 'utm_source=hebcal.com&utm_medium=icalendar'; | ||
} | ||
return url ? appendIsraelAndTracking(url, il, 'js', 'icalendar') : url; | ||
} | ||
@@ -558,4 +596,3 @@ | ||
const candles = desc === 'Havdalah' || desc === 'Candle lighting'; | ||
const memo = candles ? '' : createMemo(ev, options.il); | ||
const memo = createMemo(ev, options.il); | ||
addOptional(arr, 'DESCRIPTION', memo); | ||
@@ -686,2 +723,9 @@ addOptional(arr, 'LOCATION', location); | ||
function createMemo(e, il) { | ||
const desc = e.getDesc(); | ||
const candles = desc === 'Havdalah' || desc === 'Candle lighting'; | ||
if (candles) { | ||
return e.memo || ''; | ||
} | ||
const url = appendTrackingToUrl(e.url(), il); | ||
@@ -688,0 +732,0 @@ const torahMemo = makeTorahMemoText(e, il).replace(/\n/g, '\\n'); |
{ | ||
"name": "@hebcal/icalendar", | ||
"version": "4.6.0", | ||
"version": "4.6.1", | ||
"author": "Michael J. Radwin (https://github.com/mjradwin)", | ||
@@ -27,4 +27,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@hebcal/core": "^3.12.0", | ||
"@hebcal/rest-api": "^3.3.3" | ||
"@hebcal/core": "^3.17.5", | ||
"@hebcal/rest-api": "^3.6.0" | ||
}, | ||
@@ -59,18 +59,18 @@ "scripts": { | ||
"@ava/babel": "^1.0.1", | ||
"@babel/core": "^7.13.10", | ||
"@babel/core": "^7.14.6", | ||
"@babel/polyfill": "^7.12.1", | ||
"@babel/preset-env": "^7.13.12", | ||
"@babel/register": "^7.13.8", | ||
"@babel/preset-env": "^7.14.5", | ||
"@babel/register": "^7.14.5", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^17.1.0", | ||
"@rollup/plugin-commonjs": "^19.0.0", | ||
"@rollup/plugin-json": "^4.1.0", | ||
"@rollup/plugin-node-resolve": "^11.2.0", | ||
"@rollup/plugin-node-resolve": "^13.0.0", | ||
"ava": "^3.15.0", | ||
"eslint": "^7.22.0", | ||
"eslint": "^7.29.0", | ||
"eslint-config-google": "^0.14.0", | ||
"jsdoc": "^3.6.6", | ||
"jsdoc": "^3.6.7", | ||
"jsdoc-to-markdown": "^6.0.1", | ||
"murmurhash-js": "^1.0.0", | ||
"rollup": "^2.42.3" | ||
"rollup": "^2.52.2" | ||
} | ||
} |
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
64979
1382
Updated@hebcal/core@^3.17.5
Updated@hebcal/rest-api@^3.6.0