ag-common 0.0.506 → 0.0.507

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.
@@ -21,7 +21,7 @@ export declare function objectToArray<T>(obj: {
21
21
  * @param depthLeft
22
22
  * @returns
23
23
  */
24
- export declare const objectAlphaSort: (object: any, depthLeft?: number) => object;
24
+ export declare const objectAlphaSort: <T>(object: T, depthLeft?: number) => T;
25
25
  /**
26
26
  * Convert a random object type to a record<string,string>
27
27
  * @param entries Could be URLSearchParams
@@ -69,11 +69,13 @@ const objectAlphaSort = (object, depthLeft = -1) => {
69
69
  .sort((a, b) => (a.toLowerCase() < b.toLowerCase() ? -1 : 1))
70
70
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
71
71
  .reduce((result, key) => {
72
+ //@ts-ignore
72
73
  result[key] = (0, exports.objectAlphaSort)(object[key], depthLeft - 1);
73
74
  return result;
74
75
  }, {}));
75
76
  }
76
77
  else if (Array.isArray(object)) {
78
+ //@ts-ignore
77
79
  return object.map((obj) => (0, exports.objectAlphaSort)(obj, depthLeft - 1));
78
80
  }
79
81
  else {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.506",
2
+ "version": "0.0.507",
3
3
  "name": "ag-common",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",