@yuneta/gobj-js 7.28.1 → 7.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4000,9 +4000,10 @@ exports.GObj = k, exports.SDATA = x, exports.SDATAAUTHZ = (e, t, n, r, o, s) =>
4000
4000
  return p;
4001
4001
  }
4002
4002
  }), exports.build_command_response = r, exports.build_path = function(...e) {
4003
- let t = "", n = 0;
4004
- for (let r of e) null != r && "" !== r && (r = String(r), r = 0 === n ? r.replace(/\/+$/, "") : r.replace(/^\/+/, "").replace(/\/+$/, ""), "" !== r && (n > 0 && (t += "/"), t += r, n++));
4005
- return t;
4003
+ let t = null, n = [];
4004
+ for (let r of e) if (null != r && "" !== r) if (r = String(r), null !== t) for (let e of r.split("/")) "" !== e && "." !== e && (".." !== e ? n.push(e) : n.pop());
4005
+ else t = r.replace(/(.)\/+$/, "$1");
4006
+ return null === t ? "" : 0 === n.length ? t : t + (t.endsWith("/") ? "" : "/") + n.join("/");
4006
4007
  }, exports.build_stats_response = o, exports.clean_name = function(e) {
4007
4008
  return e.replace(/[?# ^:]/g, "_");
4008
4009
  }, exports.clear_timeout = yl, exports.cmp_two_simple_json = ns, exports.command_parameter_from_json = xe, exports.command_parameter_from_text = function(e, t) {