@yuneta/gobj-js 7.28.0 → 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.
@@ -258,7 +258,7 @@
258
258
  };
259
259
  var x = 1;
260
260
  function K(e) {
261
- Bo(e) && (e = JSON.stringify(e)), ar(" ".repeat(Math.max(1, 2 * h)) + String(e));
261
+ Bo(e) && (e = JSON.stringify(e)), ar(" ".repeat(Math.max(1, 4 * h)) + String(e));
262
262
  }
263
263
  var B = Object.freeze({
264
264
  TRACE_MACHINE: 65536,
@@ -4003,9 +4003,10 @@
4003
4003
  return p;
4004
4004
  }
4005
4005
  }), e.build_command_response = o, e.build_path = function(...e) {
4006
- let t = "", n = 0;
4007
- 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++));
4008
- return t;
4006
+ let t = null, n = [];
4007
+ 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());
4008
+ else t = r.replace(/(.)\/+$/, "$1");
4009
+ return null === t ? "" : 0 === n.length ? t : t + (t.endsWith("/") ? "" : "/") + n.join("/");
4009
4010
  }, e.build_stats_response = l, e.clean_name = function(e) {
4010
4011
  return e.replace(/[?# ^:]/g, "_");
4011
4012
  }, e.clear_timeout = vi, e.cmp_two_simple_json = rl, e.command_parameter_from_json = ke, e.command_parameter_from_text = function(e, t) {