gtfs-to-html 2.10.6 → 2.10.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gtfs-to-html",
3
- "version": "2.10.6",
3
+ "version": "2.10.7",
4
4
  "private": false,
5
5
  "description": "Build human readable transit timetables as HTML, PDF or CSV from GTFS",
6
6
  "keywords": [
@@ -57,7 +57,7 @@
57
57
  "gtfs-realtime-pbf-js-module": "^1.0.0",
58
58
  "js-beautify": "^1.15.1",
59
59
  "lodash-es": "^4.17.21",
60
- "marked": "^15.0.4",
60
+ "marked": "^15.0.5",
61
61
  "moment": "^2.30.1",
62
62
  "pbf": "^4.0.1",
63
63
  "pretty-error": "^4.0.0",
@@ -79,7 +79,7 @@
79
79
  "@types/js-beautify": "^1.14.3",
80
80
  "@types/lodash-es": "^4.17.12",
81
81
  "@types/morgan": "^1.9.9",
82
- "@types/node": "^22.10.3",
82
+ "@types/node": "^22.10.4",
83
83
  "@types/pug": "^2.0.10",
84
84
  "@types/sanitize-html": "^2.13.0",
85
85
  "@types/timer-machine": "^1.1.3",
@@ -136,4 +136,11 @@
136
136
  }
137
137
 
138
138
  return tripName;
139
- }
139
+ }
140
+
141
+ function formatListForDisplay(list) {
142
+ return new Intl.ListFormat('en-US', {
143
+ style: 'long',
144
+ type: 'conjunction',
145
+ }).format(list);
146
+ }
@@ -6,7 +6,7 @@ include formatting_functions.pug
6
6
  else
7
7
  .overview-list
8
8
  each timetablePageGroup in getAgencyTimetableGroups(timetablePages, agencies)
9
- h1= `${!agency || !agency.agency_name ? '' : agency.agency_name} Routes`
9
+ h1= `${formatListForDisplay(agencies.map((agency) => agency.agency_name))} Routes`
10
10
  each timetablePage in timetablePageGroup.timetablePages
11
11
  if config.allowEmptyTimetables || timetablePage.consolidatedTimetables.length > 0
12
12
  a.timetable-page-link(href=`${timetablePage.relativePath}` data-route-ids=`${timetablePage.route_ids ? timetablePage.route_ids.join(',') : ''}`)