@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.
- package/dist/index.cjs +24 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +24 -0
- package/dist/index.mjs.map +1 -1
- package/dist/path-events.d.ts +15 -0
- package/package.json +1 -1
package/dist/path-events.d.ts
CHANGED
|
@@ -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
|
*
|