fiberx-backend-toolkit 0.1.19 → 0.1.21
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.
|
@@ -83,7 +83,7 @@ declare class InputTransformerUtil {
|
|
|
83
83
|
* Safely parse JSON input
|
|
84
84
|
*/
|
|
85
85
|
static toJson<T = unknown>(json_input: string | unknown | null | undefined): T | null;
|
|
86
|
-
toValidNumber(input: unknown): number | null;
|
|
86
|
+
static toValidNumber(input: unknown): number | null;
|
|
87
87
|
/**
|
|
88
88
|
* Calculate pagination offset and limit
|
|
89
89
|
*/
|
|
@@ -237,7 +237,7 @@ class InputTransformerUtil {
|
|
|
237
237
|
return null;
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
toValidNumber(input) {
|
|
240
|
+
static toValidNumber(input) {
|
|
241
241
|
if (typeof input === "number")
|
|
242
242
|
return input;
|
|
243
243
|
if (typeof input === "string" && input.trim() !== "" && !isNaN(Number(input))) {
|
|
@@ -202,6 +202,9 @@ class InputValidatorUtil {
|
|
|
202
202
|
}
|
|
203
203
|
const new_val = normalize(getNestedValue(new_input, key));
|
|
204
204
|
const old_val = normalize(getNestedValue(existing_data, key));
|
|
205
|
+
if (new_val === undefined) {
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
205
208
|
if (!InputValidatorUtil.isDeepEqual(new_val, old_val)) {
|
|
206
209
|
console.log("🔺 CHANGED:", key, { new_val, old_val });
|
|
207
210
|
return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fiberx-backend-toolkit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"description": "A TypeScript backend toolkit providing shared domain logic, infrastructure helpers, and utilities for FiberX server-side applications and services.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./dist/index.js",
|