nhb-toolbox 4.0.53 → 4.0.54
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.
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sanitizeData = sanitizeData;
|
|
4
4
|
exports.parseObjectValues = parseObjectValues;
|
|
5
|
-
const guards_1 = require("../form/guards");
|
|
6
5
|
const non_primitives_1 = require("../guards/non-primitives");
|
|
7
6
|
const primitives_1 = require("../guards/primitives");
|
|
8
7
|
const basics_1 = require("../string/basics");
|
|
@@ -92,9 +91,9 @@ function sanitizeData(input, options) {
|
|
|
92
91
|
}
|
|
93
92
|
else if (value && Array.isArray(value)) {
|
|
94
93
|
// Keep file arrays untouched
|
|
95
|
-
if (
|
|
96
|
-
|
|
97
|
-
}
|
|
94
|
+
// if (isFileArray(value) || isCustomFileArray(value)) {
|
|
95
|
+
// acc[key as keyof T] = value as T[keyof T];
|
|
96
|
+
// }
|
|
98
97
|
// acc[key as keyof T] = value.map(sanitizeData) as T[keyof T];
|
|
99
98
|
const sanitizedArray = _processArray(value, fullKeyPath);
|
|
100
99
|
if (!ignoreFalsy || sanitizedArray.length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../src/object/sanitize.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../../src/object/sanitize.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAEX,aAAa,EACb,eAAe,EACf,YAAY,EACZ,MAAM,SAAS,CAAC;AAEjB;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;AAEpD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;AAExD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,aAAa,EACnD,MAAM,EAAE,CAAC,EACT,OAAO,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,GAC1B,cAAc,CAAC,CAAC,CAAC,CAAC;AAErB;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC7B,KAAK,EAAE,CAAC,EAAE,EACV,OAAO,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,GAC1B,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;AAgKvB;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,aAAa,GAAG,YAAY,CAgCrE"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { isCustomFileArray, isFileArray } from '../form/guards';
|
|
2
1
|
import { isArrayOfType, isNotEmptyObject, isObject, } from '../guards/non-primitives';
|
|
3
2
|
import { isString } from '../guards/primitives';
|
|
4
3
|
import { trimString } from '../string/basics';
|
|
@@ -88,9 +87,9 @@ export function sanitizeData(input, options) {
|
|
|
88
87
|
}
|
|
89
88
|
else if (value && Array.isArray(value)) {
|
|
90
89
|
// Keep file arrays untouched
|
|
91
|
-
if (isFileArray(value) || isCustomFileArray(value)) {
|
|
92
|
-
|
|
93
|
-
}
|
|
90
|
+
// if (isFileArray(value) || isCustomFileArray(value)) {
|
|
91
|
+
// acc[key as keyof T] = value as T[keyof T];
|
|
92
|
+
// }
|
|
94
93
|
// acc[key as keyof T] = value.map(sanitizeData) as T[keyof T];
|
|
95
94
|
const sanitizedArray = _processArray(value, fullKeyPath);
|
|
96
95
|
if (!ignoreFalsy || sanitizedArray.length > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nhb-toolbox",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.54",
|
|
4
4
|
"description": "A versatile collection of smart, efficient, and reusable utility functions and classes for everyday development needs.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|