qansigliere-api-utils 2026.11.1 → 2026.11.2
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/logger/logger.js +11 -1
- package/package.json +1 -1
package/logger/logger.js
CHANGED
|
@@ -5,7 +5,17 @@ function isObject(data) {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
function printObject(data) {
|
|
8
|
-
|
|
8
|
+
if (isObject(data)) {
|
|
9
|
+
if (isFormData(data)) {
|
|
10
|
+
return JSON.stringify(Object.fromEntries(data));
|
|
11
|
+
} else {
|
|
12
|
+
return JSON.stringify(data);
|
|
13
|
+
}
|
|
14
|
+
} else return data;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function isFormData(data) {
|
|
18
|
+
return data instanceof FormData;
|
|
9
19
|
}
|
|
10
20
|
|
|
11
21
|
export class Logger {
|