Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const colors = require('vbb-line-colors')
const addTransferInfoToJourney = require('./lib/add-transfer-info')
const {parseLine: _parseLine} = vbbProfile
const parseLineWithColor = ({parsed}, l) => {
const {product, name} = parsed
const c = colors[product] && colors[product][name]
if (c) parsed.color = c
return parsed
}
const customVbbProfile = {
...vbbProfile,
parseLine: parseHook(_parseLine, parseLineWithColor)
}
const defaults = {
profile: customVbbProfile
}
const createVbbHafas = (userAgent, opt = {}) => {
const {profile} = {...defaults, ...opt}
const hafas = createClient(profile, userAgent)
const origJourneys = hafas.journeys
const journeysWithTransfers = (from, to, opt = {}) => {
if (opt && opt.transferInfo) opt.stopovers = true
const p = origJourneys(from, to, opt)