@fraqjs/fraq 0.6.2 → 0.6.3
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.d.mts +1 -0
- package/dist/index.mjs +9 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -5593,6 +5593,7 @@ declare namespace filter {
|
|
|
5593
5593
|
function admin(): Filter;
|
|
5594
5594
|
function or(...filters: Filter[]): Filter;
|
|
5595
5595
|
function and(...filters: Filter[]): Filter;
|
|
5596
|
+
function not(filter: Filter): Filter;
|
|
5596
5597
|
}
|
|
5597
5598
|
//#endregion
|
|
5598
5599
|
//#region src/core/logging.d.ts
|
package/dist/index.mjs
CHANGED
|
@@ -839,6 +839,15 @@ let filter;
|
|
|
839
839
|
return result;
|
|
840
840
|
}
|
|
841
841
|
_filter.and = and;
|
|
842
|
+
function not(filter) {
|
|
843
|
+
const result = {};
|
|
844
|
+
for (const key of eventKeys) result[key] = (event) => {
|
|
845
|
+
const predicate = filter[key];
|
|
846
|
+
return !predicate?.(event);
|
|
847
|
+
};
|
|
848
|
+
return result;
|
|
849
|
+
}
|
|
850
|
+
_filter.not = not;
|
|
842
851
|
})(filter || (filter = {}));
|
|
843
852
|
//#endregion
|
|
844
853
|
//#region src/core/plugin.ts
|