@vope/utils 1.6.5 → 1.6.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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * 对象数组转hash(要求主键值为string|number类型)
2
+ * 对象数组转hash
3
3
  * @example
4
4
  * hash8json(
5
5
  * [
@@ -9,4 +9,4 @@
9
9
  * 'key'
10
10
  * ).a.value // 1
11
11
  */
12
- export declare const hash8json: <K extends string | symbol, T extends Record<K, string | number>>(list: T[], key: K) => Record<T[K], T>;
12
+ export declare const hash8json: <K extends string | symbol, T extends Record<K, keyof any>>(list: T[], key: K) => Record<T[K], T>;
@@ -1,6 +1,6 @@
1
1
  /**
2
- * 字符数组转hash
2
+ * 数组转hash
3
3
  * @example
4
4
  * hash8strings(['a', 'b']).a // 0
5
5
  */
6
- export declare const hash8strings: <T extends string | number>(list: T[]) => { [P in T]: number; };
6
+ export declare const hash8strings: <T extends keyof any>(list: T[]) => { [P in T]: number; };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vope/utils",
3
- "version": "1.6.5",
3
+ "version": "1.6.6",
4
4
  "description": "",
5
5
  "publishConfig": {
6
6
  "access": "public",