db-vendo-client
Version:
Client for bahn.de public transport APIs.
19 lines (14 loc) • 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,
};