@ztimson/utils 0.19.0 → 0.19.2

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.mjs CHANGED
@@ -930,10 +930,10 @@ class y {
930
930
  this.module = ((o = i.splice(0, 1)[0]) == null ? void 0 : o.toLowerCase()) || "", this.fullPath = e, this.path = i.join("/"), this.name = i.pop() || "", this.methods = s.split(""), this.all = s == null ? void 0 : s.includes("*"), this.none = s == null ? void 0 : s.includes("n"), this.create = !(s != null && s.includes("n")) && ((s == null ? void 0 : s.includes("*")) || (s == null ? void 0 : s.includes("w")) || (s == null ? void 0 : s.includes("c"))), this.read = !(s != null && s.includes("n")) && ((s == null ? void 0 : s.includes("*")) || (s == null ? void 0 : s.includes("r"))), this.update = !(s != null && s.includes("n")) && ((s == null ? void 0 : s.includes("*")) || (s == null ? void 0 : s.includes("w")) || (s == null ? void 0 : s.includes("u"))), this.delete = !(s != null && s.includes("n")) && ((s == null ? void 0 : s.includes("*")) || (s == null ? void 0 : s.includes("w")) || (s == null ? void 0 : s.includes("d")));
931
931
  }
932
932
  /**
933
- * Combine multiple pathed events into one parsed object. Longest path takes precedent, but all subsequent methods are
933
+ * Combine multiple events into one parsed object. Longest path takes precedent, but all subsequent methods are
934
934
  * combined until a "none" is reached
935
935
  *
936
- * @param {string | PathEvent} paths PathedEvents as strings or pre-parsed
936
+ * @param {string | PathEvent} paths Events as strings or pre-parsed
937
937
  * @return {PathEvent} Final combined permission
938
938
  */
939
939
  static combine(t) {
@@ -947,7 +947,7 @@ class y {
947
947
  /**
948
948
  * Squash 2 sets of paths & return true if any overlap is found
949
949
  *
950
- * @param {string | PathEvent | (string | PathEvent)[]} target Array of PathedEvents as strings or pre-parsed
950
+ * @param {string | PathEvent | (string | PathEvent)[]} target Array of Events as strings or pre-parsed
951
951
  * @param has Target must have at least one of these path
952
952
  * @return {boolean} Whether there is any overlap
953
953
  */
@@ -964,7 +964,7 @@ class y {
964
964
  /**
965
965
  * Squash 2 sets of paths & return true if the target has all paths
966
966
  *
967
- * @param {string | PathEvent | (string | PathEvent)[]} target Array of PathedEvents as strings or pre-parsed
967
+ * @param {string | PathEvent | (string | PathEvent)[]} target Array of Events as strings or pre-parsed
968
968
  * @param has Target must have all these paths
969
969
  * @return {boolean} Whether there is any overlap
970
970
  */
@@ -974,7 +974,7 @@ class y {
974
974
  /**
975
975
  * Same as `has` but raises an error if there is no overlap
976
976
  *
977
- * @param {string | string[]} target Array of PathedEvents as strings or pre-parsed
977
+ * @param {string | string[]} target Array of Events as strings or pre-parsed
978
978
  * @param has Target must have at least one of these path
979
979
  */
980
980
  static hasFatal(t, ...e) {
@@ -983,27 +983,27 @@ class y {
983
983
  /**
984
984
  * Same as `hasAll` but raises an error if the target is missing any paths
985
985
  *
986
- * @param {string | string[]} target Array of PathedEvents as strings or pre-parsed
986
+ * @param {string | string[]} target Array of Events as strings or pre-parsed
987
987
  * @param has Target must have all these paths
988
988
  */
989
989
  static hasAllFatal(t, ...e) {
990
990
  if (!y.hasAll(t, ...e)) throw new Error(`Requires all: ${b(e).join(", ")}`);
991
991
  }
992
992
  /**
993
- * Create pathed event string from its components
993
+ * Create event string from its components
994
994
  *
995
995
  * @param {string | string[]} path Event path
996
996
  * @param {Method} methods Event method
997
- * @return {string} String representation of PathedEvent
997
+ * @return {string} String representation of Event
998
998
  */
999
999
  static toString(t, e) {
1000
1000
  let r = b(t).filter((s) => s != null).join("/");
1001
1001
  return e != null && e.length && (r += `:${b(e).map((s) => s.toLowerCase()).join("")}`), r == null ? void 0 : r.trim().replaceAll(/\/{2,}/g, "/").replaceAll(/(^\/|\/$)/g, "");
1002
1002
  }
1003
1003
  /**
1004
- * Create pathed event string from its components
1004
+ * Create event string from its components
1005
1005
  *
1006
- * @return {string} String representation of PathedEvent
1006
+ * @return {string} String representation of Event
1007
1007
  */
1008
1008
  toString() {
1009
1009
  return y.toString(this.fullPath, this.methods);
@@ -1211,7 +1211,7 @@ export {
1211
1211
  ue as PE,
1212
1212
  xt as PES,
1213
1213
  y as PathEvent,
1214
- ae as PathedEventEmitter,
1214
+ ae as PathEventEmitter,
1215
1215
  _ as PaymentRequiredError,
1216
1216
  O as PromiseProgress,
1217
1217
  st as ServiceUnavailableError,