@vope/utils 1.0.1 → 1.0.2
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/README.md +5 -0
- package/cjs/convert/json.js +1 -1
- package/lib/convert/json.js +1 -1
- package/package.json +2 -2
- package/types/convert/json.d.ts +2 -2
package/README.md
CHANGED
package/cjs/convert/json.js
CHANGED
package/lib/convert/json.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vope/utils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"main": "./cjs/index.js",
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "rimraf types & npm run cjs | npm run esm",
|
|
15
|
+
"init:build": "npm run devs & npm run trove & npm run test:build",
|
|
15
16
|
"cjs": "rimraf cjs & npx tsc -p ./tsconfig.cjs.json",
|
|
16
17
|
"esm": "rimraf lib & npx tsc -p ./tsconfig.esm.json",
|
|
17
18
|
"trove": "node ./__devs/trove.cjs",
|
|
@@ -21,7 +22,6 @@
|
|
|
21
22
|
"test:dev": "npm run test:build & npm run test",
|
|
22
23
|
"test:build": "rimraf __tests & rimraf lib & node ./__devs/test.cjs",
|
|
23
24
|
"test:all": "npm run devs & npm run test:build & npm run test",
|
|
24
|
-
"init": "npm run devs & npm run trove & npm run test:build",
|
|
25
25
|
"prepublishOnly": "npm run devs & npm run trove & npm run build"
|
|
26
26
|
},
|
|
27
27
|
"exports": {
|
package/types/convert/json.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 对象数组转hash(要求主键值为string类型)
|
|
2
|
+
* 对象数组转hash(要求主键值为string|number类型)
|
|
3
3
|
* @example
|
|
4
4
|
* hash8json(
|
|
5
5
|
* [
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* 'key'
|
|
10
10
|
* ).a.value // 1
|
|
11
11
|
*/
|
|
12
|
-
declare const hash8json: <K extends string | symbol, T extends Record<K, string>>(list: T[], key: K) => Record<T[K], T>;
|
|
12
|
+
declare const hash8json: <K extends string | symbol, T extends Record<K, string | number>>(list: T[], key: K) => Record<T[K], T>;
|
|
13
13
|
export default hash8json;
|