Update merge script to remove entries with empty stops arrays
All checks were successful
Generate Release / validate_and_release (push) Successful in 23s

This commit is contained in:
Fred Boniface 2024-03-14 12:13:51 +00:00
parent d7c0e0fb02
commit 521761a620

View File

@ -36,8 +36,10 @@ function sortAndMergeYAMLFiles() {
// Construct the output string // Construct the output string
let outputString = "pis:\n"; let outputString = "pis:\n";
mergedData.forEach(item => { mergedData.forEach(item => {
if (item.stops.length > 0) {
outputString += ` - code: "${item.code}"\n`; outputString += ` - code: "${item.code}"\n`;
outputString += ` stops: [${item.stops.map(stop => `${stop}`).join(',')}]\n`; outputString += ` stops: [${item.stops.map(stop => `${stop}`).join(',')}]\n`;
}
}); });
try { try {