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

17 lines
305 B
JavaScript
Raw Normal View History

2018-02-15 17:31:43 +01:00
'use strict'
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?
2018-02-15 17:31:43 +01:00
}
return str
}
module.exports = formatLocationIdentifier