@splendidlabz/utils 1.11.5 → 1.11.6
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/cjs/lib/index.cjs
CHANGED
|
@@ -713,6 +713,9 @@ function isDigit(char) {
|
|
|
713
713
|
|
|
714
714
|
// src/lib/objects/camelcase-keys.js
|
|
715
715
|
function camelCaseKeys(obj) {
|
|
716
|
+
if (Array.isArray(obj)) {
|
|
717
|
+
return obj.map((value) => camelCaseKeys(value));
|
|
718
|
+
}
|
|
716
719
|
if (typeof obj !== "object" || obj === null) {
|
|
717
720
|
return obj;
|
|
718
721
|
}
|
|
@@ -98,6 +98,9 @@ function isDigit(char) {
|
|
|
98
98
|
|
|
99
99
|
// src/lib/objects/camelcase-keys.js
|
|
100
100
|
function camelCaseKeys(obj) {
|
|
101
|
+
if (Array.isArray(obj)) {
|
|
102
|
+
return obj.map((value) => camelCaseKeys(value));
|
|
103
|
+
}
|
|
101
104
|
if (typeof obj !== "object" || obj === null) {
|
|
102
105
|
return obj;
|
|
103
106
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { objectForEach } from "./loop.js";
|
|
2
2
|
import { toCamel } from "../strings/convert-case/convert-case.js";
|
|
3
3
|
function camelCaseKeys(obj) {
|
|
4
|
+
if (Array.isArray(obj)) {
|
|
5
|
+
return obj.map((value) => camelCaseKeys(value));
|
|
6
|
+
}
|
|
4
7
|
if (typeof obj !== "object" || obj === null) {
|
|
5
8
|
return obj;
|
|
6
9
|
}
|