@ztimson/utils 0.28.4 → 0.28.5

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.
package/dist/index.cjs CHANGED
@@ -1888,6 +1888,8 @@ ${opts.message || this.desc}`;
1888
1888
  module;
1889
1889
  /** Entire path, including the module & name */
1890
1890
  fullPath;
1891
+ /** Parent directory, excludes module & name */
1892
+ dir;
1891
1893
  /** Path including the name, excluding the module */
1892
1894
  path;
1893
1895
  /** Last segment of path */
@@ -1965,6 +1967,7 @@ ${opts.message || this.desc}`;
1965
1967
  if (p === "" || p === void 0 || p === "*") {
1966
1968
  this.module = "";
1967
1969
  this.path = "";
1970
+ this.dir = "";
1968
1971
  this.fullPath = "**";
1969
1972
  this.name = "";
1970
1973
  this.methods = new ASet(p === "*" ? ["*"] : method.split(""));
@@ -1975,6 +1978,7 @@ ${opts.message || this.desc}`;
1975
1978
  let temp = p.split("/").filter((p2) => !!p2);
1976
1979
  this.module = temp.splice(0, 1)[0] || "";
1977
1980
  this.path = temp.join("/");
1981
+ this.dir = temp.length > 2 ? temp.slice(0, -1).join("/") : "";
1978
1982
  this.fullPath = `${this.module}${this.module && this.path ? "/" : ""}${this.path}`;
1979
1983
  this.name = temp.pop() || "";
1980
1984
  this.hasGlob = this.fullPath.includes("*");