diff --git a/package.json b/package.json index 3b44082..f44fbc7 100644 --- a/package.json +++ b/package.json @@ -34,16 +34,16 @@ "author": "Michael J. Radwin (https://github.com/mjradwin)", "license": "BSD-2-Clause", "devDependencies": { - "@eslint/js": "^9.14.0", + "@eslint/js": "^9.15.0", "@rollup/plugin-commonjs": "^28.0.1", "@rollup/plugin-node-resolve": "^15.3.0", "@rollup/plugin-terser": "^0.4.4", "bootstrap5-autocomplete": "^1.1.33", "csv-parse": "^5.5.6", - "eslint": "^9.14.0", - "eslint-plugin-n": "^17.13.1", + "eslint": "^9.15.0", + "eslint-plugin-n": "^17.13.2", "globals": "^15.12.0", - "rollup": "^4.25.0" + "rollup": "^4.27.3" }, "dependencies": { "@hebcal/core": "^5.8.2", diff --git a/src/hebcal.js b/src/hebcal.js index 8885f0d..76bd1dd 100644 --- a/src/hebcal.js +++ b/src/hebcal.js @@ -437,7 +437,7 @@ function renderJson(ctx) { if (q.hdp === '1') { options.heDateParts = true; } - let obj = myEventsToClassicApi(events, options, leyningOff); + let obj = myEventsToClassicApi(events, options, !leyningOff); const cb = empty(q.callback) ? false : q.callback.replace(/[^\w\.]/g, ''); if (cb) { obj = cb + '(' + JSON.stringify(obj) + ')\n'; diff --git a/src/myEventsToClassicApi.js b/src/myEventsToClassicApi.js index 65acbc4..7399500 100644 --- a/src/myEventsToClassicApi.js +++ b/src/myEventsToClassicApi.js @@ -8,14 +8,14 @@ import {readJSON} from './readJSON.js'; export const pkg = readJSON('../package.json'); -export function myEventsToClassicApi(events, options, leyningOff) { +export function myEventsToClassicApi(events, options, leyning) { const obj = eventsToClassicApiHeader(events, options); if (typeof obj.version === 'string') { obj.version += '-' + pkg.version; } obj.items = events.map((ev) => { - const apiObj = eventToClassicApiObject(ev, options, !leyningOff); - if (!leyningOff && + const apiObj = eventToClassicApiObject(ev, options, leyning); + if (leyning && (ev.getFlags() & flags.PARSHA_HASHAVUA) && ev.getDate().getFullYear() >= 5745) { const triReading = getTriennialForParshaHaShavua(ev, options.il);