@tmagic/utils 1.5.21 → 1.5.23

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.
@@ -273,7 +273,7 @@ const guid = (digit = 8) => "x".repeat(digit).replace(/[xy]/g, (c) => {
273
273
  });
274
274
  const getKeysArray = (keys) => (
275
275
  // 将 array[0] 转成 array.0
276
- `${keys}`.replaceAll(/\[(\d+)\]/g, ".$1").split(".")
276
+ `${keys}`.replace(/\[(\d+)\]/g, ".$1").split(".")
277
277
  );
278
278
  const getValueByKeyPath = (keys = "", data = {}) => {
279
279
  const keyArray = Array.isArray(keys) ? keys : getKeysArray(keys);
@@ -2646,7 +2646,7 @@
2646
2646
  });
2647
2647
  const getKeysArray = (keys) => (
2648
2648
  // 将 array[0] 转成 array.0
2649
- `${keys}`.replaceAll(/\[(\d+)\]/g, ".$1").split(".")
2649
+ `${keys}`.replace(/\[(\d+)\]/g, ".$1").split(".")
2650
2650
  );
2651
2651
  const getValueByKeyPath = (keys = "", data = {}) => {
2652
2652
  const keyArray = Array.isArray(keys) ? keys : getKeysArray(keys);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.5.21",
2
+ "version": "1.5.23",
3
3
  "name": "@tmagic/utils",
4
4
  "type": "module",
5
5
  "main": "dist/tmagic-utils.umd.cjs",
@@ -33,8 +33,8 @@
33
33
  "@types/lodash-es": "^4.17.4"
34
34
  },
35
35
  "peerDependencies": {
36
- "typescript": "*",
37
- "@tmagic/schema": "1.5.21"
36
+ "typescript": "^5.8.3",
37
+ "@tmagic/schema": "1.5.23"
38
38
  },
39
39
  "peerDependenciesMeta": {
40
40
  "typescript": {
package/src/index.ts CHANGED
@@ -296,7 +296,7 @@ export const guid = (digit = 8): string =>
296
296
 
297
297
  export const getKeysArray = (keys: string | number) =>
298
298
  // 将 array[0] 转成 array.0
299
- `${keys}`.replaceAll(/\[(\d+)\]/g, '.$1').split('.');
299
+ `${keys}`.replace(/\[(\d+)\]/g, '.$1').split('.');
300
300
 
301
301
  export const getValueByKeyPath = (
302
302
  keys: number | string | string[] = '',