db-vendo-client/format/location-identifier.js
2018-03-03 00:18:53 +01:00

14 lines
303 B
JavaScript

'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?
}
return str
}
module.exports = formatLocationIdentifier