@ztimson/utils 0.21.3 → 0.21.4

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.
@@ -78,6 +78,14 @@ export declare class PathEvent {
78
78
  * @return {PathEvent} Final combined permission
79
79
  */
80
80
  static combine(...paths: (string | PathEvent)[]): PathEvent;
81
+ /**
82
+ * Filter a set of paths based on the target
83
+ *
84
+ * @param {string | PathEvent | (string | PathEvent)[]} target Array of events that will filtered
85
+ * @param filter {...PathEvent} Must container one of
86
+ * @return {boolean} Whether there is any overlap
87
+ */
88
+ static filter(target: string | PathEvent | (string | PathEvent)[], ...filter: (string | PathEvent)[]): PathEvent[];
81
89
  /**
82
90
  * Squash 2 sets of paths & return true if any overlap is found
83
91
  *
@@ -116,6 +124,13 @@ export declare class PathEvent {
116
124
  * @return {string} String representation of Event
117
125
  */
118
126
  static toString(path: string | string[], methods: Method | Method[]): string;
127
+ /**
128
+ * Filter a set of paths based on this event
129
+ *
130
+ * @param {string | PathEvent | (string | PathEvent)[]} target Array of events that will filtered
131
+ * @return {boolean} Whether there is any overlap
132
+ */
133
+ filter(target: string | PathEvent | (string | PathEvent)[]): PathEvent[];
119
134
  /**
120
135
  * Create event string from its components
121
136
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ztimson/utils",
3
- "version": "0.21.3",
3
+ "version": "0.21.4",
4
4
  "description": "Utility library",
5
5
  "author": "Zak Timson",
6
6
  "license": "MIT",