gtfs-to-html 2.9.11 → 2.9.12

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/dist/app/index.js CHANGED
@@ -376,7 +376,7 @@ function getAgencyGeoJSON(config2) {
376
376
  }
377
377
 
378
378
  // package.json
379
- var version = "2.9.11";
379
+ var version = "2.9.12";
380
380
 
381
381
  // src/lib/utils.ts
382
382
  var isTimepoint = (stoptime) => {
@@ -513,26 +513,26 @@ var getCalendarDatesForTimetable = (timetable, config2) => {
513
513
  );
514
514
  const start = fromGTFSDate(timetable.start_date);
515
515
  const end = fromGTFSDate(timetable.end_date);
516
- const excludedDates = [];
517
- const includedDates = [];
516
+ const excludedDates = /* @__PURE__ */ new Set();
517
+ const includedDates = /* @__PURE__ */ new Set();
518
518
  for (const calendarDate of calendarDates) {
519
519
  if (moment2(calendarDate.date, "YYYYMMDD").isBetween(start, end)) {
520
520
  if (calendarDate.exception_type === 1) {
521
- includedDates.push(formatDate(calendarDate, config2.dateFormat));
521
+ includedDates.add(formatDate(calendarDate, config2.dateFormat));
522
522
  } else if (calendarDate.exception_type === 2) {
523
- excludedDates.push(formatDate(calendarDate, config2.dateFormat));
523
+ excludedDates.add(formatDate(calendarDate, config2.dateFormat));
524
524
  }
525
525
  }
526
526
  }
527
- const includedAndExcludedDates = excludedDates.filter(
528
- (date) => includedDates.includes(date)
527
+ const includedAndExcludedDates = new Set(
528
+ [...excludedDates].filter((date) => includedDates.has(date))
529
529
  );
530
530
  return {
531
- excludedDates: excludedDates.filter(
532
- (date) => !includedAndExcludedDates.includes(date)
531
+ excludedDates: [...excludedDates].filter(
532
+ (date) => !includedAndExcludedDates.has(date)
533
533
  ),
534
- includedDates: includedDates.filter(
535
- (date) => !includedAndExcludedDates.includes(date)
534
+ includedDates: [...includedDates].filter(
535
+ (date) => !includedAndExcludedDates.has(date)
536
536
  )
537
537
  };
538
538
  };