qjutil 0.0.1 → 0.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.
Files changed (2) hide show
  1. package/package.json +4 -1
  2. package/src/util/sign.ts +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qjutil",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "personal util",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
@@ -14,5 +14,8 @@
14
14
  "@types/node": "^25.0.3",
15
15
  "tsup": "^8.5.1",
16
16
  "typescript": "^5.9.3"
17
+ },
18
+ "dependencies": {
19
+ "ts-md5": "^2.0.1"
17
20
  }
18
21
  }
package/src/util/sign.ts CHANGED
@@ -1,5 +1,9 @@
1
+ import { Md5 } from 'ts-md5';
2
+ export function md5(str:string){
3
+ return Md5.hashStr(str)
4
+ }
1
5
 
2
- export function raw(args:any) {
6
+ export function raw(args:Record<string, any>) {
3
7
  let keys = Object.keys(args);
4
8
  //参数名ASCII码从小到大排序(字典序)
5
9
  keys = keys.sort();