|
|
|
|
@ -58,6 +58,14 @@ function notEmpty(obj, msg) {
|
|
|
|
|
return obj;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function join(delimeter, ...args) {
|
|
|
|
|
if (!args) return "";
|
|
|
|
|
|
|
|
|
|
return args.flat()
|
|
|
|
|
.filter(e => !isEmpty(e))
|
|
|
|
|
.join(delimeter || " ")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function toQuery(map, encode) {
|
|
|
|
|
if (isEmpty(map)) return "";
|
|
|
|
|
|
|
|
|
|
|