db-vendo-client/p/pkp/index.js

33 lines
708 B
JavaScript
Raw Normal View History

2020-03-11 20:00:54 +01:00
'use strict'
2020-03-18 21:43:19 +01:00
const {parseHook} = require('../../lib/profile-hooks')
const parseLocation = require('../../parse/location')
const baseProfile = require('./base.json')
2020-03-11 20:00:54 +01:00
const products = require('./products')
2020-03-18 21:43:19 +01:00
const trimStopName = ({parsed}, l) => {
if (parsed.type === 'stop' || parsed.type === 'station' && parsed.name) {
parsed.name = parsed.name.replace(/(^-|-$)/g, '')
}
return parsed
}
2020-03-11 20:00:54 +01:00
const pkpProfile = {
...baseProfile,
2020-03-11 20:00:54 +01:00
locale: 'pl-PL',
timezone: 'Europe/Warsaw',
products,
2020-03-18 21:43:19 +01:00
parseLocation: parseHook(parseLocation, trimStopName),
2020-03-11 20:00:54 +01:00
trip: true,
radar: true,
refreshJourney: false,
2020-09-16 17:21:59 +02:00
reachableFrom: true,
remarks: false, // seems like ver >= 1.20 is required
2020-03-11 20:00:54 +01:00
}
module.exports = pkpProfile