Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const journeyPart = (tz, s, ln, r) => (d) => {
const result = {
id: d.jid,
line: ln[parseInt(d.prodX)],
direction: d.dirTxt, // todo: parse this
// todo: isPartCncl, isRchbl, poly
}
if (d.stopL) result.passed = d.stopL.map(parse.stopover(tz, s, ln, r, d))
if (Array.isArray(d.remL)) d.remL.forEach(parse.applyRemark(s, ln, r))
return result
}