hono-camelcase 0.2.1 → 0.2.3

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/lib.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const convertObjectKeysToCamelCase: (data: Record<string, unknown> | Array<unknown>) => Record<string, unknown> | unknown[];
1
+ export declare const convertObjectKeysToCamelCase: (data: Record<string, unknown> | Array<unknown>) => Record<string, unknown> | Array<unknown>;
package/dist/lib.js CHANGED
@@ -1,9 +1,6 @@
1
1
  export const convertObjectKeysToCamelCase = (data) => {
2
2
  if (Array.isArray(data)) {
3
- for (let count = 0; count < data.length; count++) {
4
- data[count] = convertCurrentValue(data[count]);
5
- }
6
- return data;
3
+ return data.map(convertCurrentValue);
7
4
  }
8
5
  else {
9
6
  const transformedData = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hono-camelcase",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Hono middleware to enforce camelCase in JSON responses.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",