mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-22 22:59:35 +02:00
18 lines
303 B
JavaScript
18 lines
303 B
JavaScript
const sep = '@';
|
|
|
|
const formatLocationIdentifier = (data) => {
|
|
let str = '';
|
|
for (let key in data) {
|
|
if (!Object.prototype.hasOwnProperty.call(data, key)) {
|
|
continue;
|
|
}
|
|
|
|
str += key + '=' + data[key] + sep; // todo: escape, but how?
|
|
}
|
|
|
|
return str;
|
|
};
|
|
|
|
export {
|
|
formatLocationIdentifier,
|
|
};
|