mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
37 lines
714 B
JavaScript
37 lines
714 B
JavaScript
import {products} from '../../../p/bvg/products.js';
|
|
|
|
import {
|
|
createValidateStation,
|
|
createValidateJourneyLeg,
|
|
createValidateDeparture,
|
|
createValidateMovement,
|
|
} from './validators.js';
|
|
|
|
const createVbbBvgValidators = ({when}) => {
|
|
const cfg = {
|
|
when,
|
|
stationCoordsOptional: false,
|
|
products,
|
|
};
|
|
|
|
// todo: coordsOptional = false
|
|
const validateStation = createValidateStation(cfg);
|
|
|
|
const validateJourneyLeg = createValidateJourneyLeg(cfg);
|
|
|
|
const validateDeparture = createValidateDeparture(cfg);
|
|
|
|
const validateMovement = createValidateMovement(cfg);
|
|
|
|
return {
|
|
cfg,
|
|
validateStation,
|
|
validateJourneyLeg,
|
|
validateDeparture,
|
|
validateMovement,
|
|
};
|
|
};
|
|
|
|
export {
|
|
createVbbBvgValidators,
|
|
};
|