@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.
@@ -4001,9 +4001,10 @@ var gobjJs = function(e) {
4001
4001
  return p;
4002
4002
  }
4003
4003
  }), e.build_command_response = o, e.build_path = function(...e) {
4004
- let t = "", n = 0;
4005
- 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++));
4006
- return t;
4004
+ let t = null, n = [];
4005
+ 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());
4006
+ else t = r.replace(/(.)\/+$/, "$1");
4007
+ return null === t ? "" : 0 === n.length ? t : t + (t.endsWith("/") ? "" : "/") + n.join("/");
4007
4008
  }, e.build_stats_response = l, e.clean_name = function(e) {
4008
4009
  return e.replace(/[?# ^:]/g, "_");
4009
4010
  }, e.clear_timeout = vi, e.cmp_two_simple_json = rl, e.command_parameter_from_json = ke, e.command_parameter_from_text = function(e, t) {