mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
20 lines
301 B
JavaScript
20 lines
301 B
JavaScript
const formatLocationFilter = (stops, addresses, poi) => {
|
|
if (stops && addresses && poi) {
|
|
return ['ALL'];
|
|
}
|
|
const types = [];
|
|
if (stops) {
|
|
types.push('ST');
|
|
}
|
|
if (addresses) {
|
|
types.push('ADR');
|
|
}
|
|
if (poi) {
|
|
types.push('POI');
|
|
}
|
|
return types;
|
|
};
|
|
|
|
export {
|
|
formatLocationFilter,
|
|
};
|