@ztimson/utils 0.25.18 → 0.25.19

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.
@@ -123,6 +123,32 @@ export declare class PathEvent {
123
123
  * @return {string} String representation of Event
124
124
  */
125
125
  static toString(path: string | string[], methods: Method | Method[]): string;
126
+ /**
127
+ * Squash 2 sets of paths & return true if any overlap is found
128
+ *
129
+ * @param has Target must have at least one of these path
130
+ * @return {boolean} Whether there is any overlap
131
+ */
132
+ has(...has: (string | PathEvent)[]): boolean;
133
+ /**
134
+ * Squash 2 sets of paths & return true if the target has all paths
135
+ *
136
+ * @param has Target must have all these paths
137
+ * @return {boolean} Whether there is any overlap
138
+ */
139
+ hasAll(...has: (string | PathEvent)[]): boolean;
140
+ /**
141
+ * Same as `has` but raises an error if there is no overlap
142
+ *
143
+ * @param has Target must have at least one of these path
144
+ */
145
+ hasFatal(...has: (string | PathEvent)[]): void;
146
+ /**
147
+ * Same as `hasAll` but raises an error if the target is missing any paths
148
+ *
149
+ * @param has Target must have all these paths
150
+ */
151
+ hasAllFatal(...has: (string | PathEvent)[]): void;
126
152
  /**
127
153
  * Filter a set of paths based on this event
128
154
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ztimson/utils",
3
- "version": "0.25.18",
3
+ "version": "0.25.19",
4
4
  "description": "Utility library",
5
5
  "author": "Zak Timson",
6
6
  "license": "MIT",