Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then((d) => {
if (!Array.isArray(d.jnyL)) return []
for (let l of d.locations) {
if (l.type === 'station') l.name = shorten(l.name)
}
const movements = d.jnyL.map(parse.movement(tz, d.locations, d.lines, d.remarks))
for (let movement of movements) {
movement.direction = shorten(movement.direction)
}
return movements
}, (err) => {throw err})
}