@ztimson/utils 0.23.1 → 0.23.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/dist/index.cjs +5 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +5 -0
- package/dist/index.mjs.map +1 -1
- package/dist/objects.d.ts +7 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -106,6 +106,10 @@ function JSONAttemptParse(json) {
|
|
|
106
106
|
return json;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
+
function JSONSerialize(obj) {
|
|
110
|
+
if (typeof obj == "object" && obj != null) return JSONSanitize(obj);
|
|
111
|
+
return obj;
|
|
112
|
+
}
|
|
109
113
|
function JSONSanitize(obj, space) {
|
|
110
114
|
return JSON.stringify(obj, (key, value2) => {
|
|
111
115
|
return value2;
|
|
@@ -1548,6 +1552,7 @@ export {
|
|
|
1548
1552
|
InternalServerError,
|
|
1549
1553
|
JSONAttemptParse,
|
|
1550
1554
|
JSONSanitize,
|
|
1555
|
+
JSONSerialize,
|
|
1551
1556
|
LETTER_LIST,
|
|
1552
1557
|
LOG_LEVEL,
|
|
1553
1558
|
Logger,
|