db-vendo-client/p/dbnav/location-filter.js

21 lines
301 B
JavaScript
Raw Normal View History

2024-12-21 23:04:05 +00:00
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,
};