db-vendo-client/format/location-identifier.js

19 lines
303 B
JavaScript
Raw Normal View History

const sep = '@';
2018-02-15 17:31:43 +01:00
const formatLocationIdentifier = (data) => {
let str = '';
2018-02-15 17:31:43 +01:00
for (let key in data) {
if (!Object.prototype.hasOwnProperty.call(data, key)) {
continue;
}
2018-02-15 17:31:43 +01:00
str += key + '=' + data[key] + sep; // todo: escape, but how?
2018-02-15 17:31:43 +01:00
}
return str;
};
2018-02-15 17:31:43 +01:00
2022-05-07 16:17:37 +02:00
export {
formatLocationIdentifier,
};