@konplit-services/common 1.0.371 → 1.0.372
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/build/helper/index.d.ts
CHANGED
package/build/helper/index.js
CHANGED
|
@@ -66,3 +66,4 @@ __exportStar(require("./subscription-cron-expression"), exports);
|
|
|
66
66
|
__exportStar(require("./encryptions"), exports);
|
|
67
67
|
__exportStar(require("./bank-account-types"), exports);
|
|
68
68
|
__exportStar(require("./subaccount"), exports);
|
|
69
|
+
__exportStar(require("./remove-query-properties"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const stripQueryProps: <T extends Record<string, any>>(input: T, keysToRemove?: (keyof T)[]) => Partial<T>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stripQueryProps = void 0;
|
|
4
|
+
const stripQueryProps = (input, keysToRemove = [
|
|
5
|
+
"sort_by",
|
|
6
|
+
"from",
|
|
7
|
+
"to",
|
|
8
|
+
"limit",
|
|
9
|
+
"page",
|
|
10
|
+
"order",
|
|
11
|
+
]) => {
|
|
12
|
+
const result = {};
|
|
13
|
+
for (const key in input) {
|
|
14
|
+
if (!keysToRemove.includes(key)) {
|
|
15
|
+
result[key] = input[key];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return result;
|
|
19
|
+
};
|
|
20
|
+
exports.stripQueryProps = stripQueryProps;
|