mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
BVG: minor changes
This commit is contained in:
parent
3453cbe159
commit
a8d4d328b8
1 changed files with 9 additions and 6 deletions
|
@ -6,11 +6,13 @@ const parseLineName = require('vbb-parse-line')
|
||||||
const getStations = require('vbb-stations')
|
const getStations = require('vbb-stations')
|
||||||
const {parseHook} = require('../../lib/profile-hooks')
|
const {parseHook} = require('../../lib/profile-hooks')
|
||||||
|
|
||||||
const _parseLine = require('../../parse/line')
|
const {
|
||||||
const _parseLocation = require('../../parse/location')
|
parseLine: _parseLine,
|
||||||
const _parseDeparture = require('../../parse/departure')
|
parseLocation: _parseLocation,
|
||||||
const _parseJourneyLeg = require('../../parse/journey-leg')
|
parseDeparture: _parseDeparture,
|
||||||
const _formatStation = require('../../format/station')
|
parseJourneyLeg: _parseJourneyLeg,
|
||||||
|
formatStation: _formatStation,
|
||||||
|
} = require('../../lib/default-profile')
|
||||||
|
|
||||||
const baseProfile = require('./base.json')
|
const baseProfile = require('./base.json')
|
||||||
const products = require('./products')
|
const products = require('./products')
|
||||||
|
@ -40,9 +42,10 @@ const parseLocation = ({parsed}, l) => {
|
||||||
return parsed
|
return parsed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// todo: S45, S46?
|
||||||
const ringbahnClockwise = /^ringbahn s\s?41$/i
|
const ringbahnClockwise = /^ringbahn s\s?41$/i
|
||||||
const ringbahnAnticlockwise = /^ringbahn s\s?42$/i
|
const ringbahnAnticlockwise = /^ringbahn s\s?42$/i
|
||||||
const parseDepartureRenameRingbahn = ({parsed}) => {
|
const parseDepartureRenameRingbahn = ({parsed}, dep) => {
|
||||||
if (parsed.line && parsed.line.product === 'suburban') {
|
if (parsed.line && parsed.line.product === 'suburban') {
|
||||||
const d = parsed.direction && parsed.direction.trim()
|
const d = parsed.direction && parsed.direction.trim()
|
||||||
if (ringbahnClockwise.test(d)) {
|
if (ringbahnClockwise.test(d)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue