@x-9lab/xlab 1.5.0 → 1.5.1

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.
@@ -54,6 +54,9 @@ export { responseResult };
54
54
  */
55
55
  declare function getMD5(...args: any[]): string;
56
56
  export { getMD5 };
57
+ /**将一个输入字符串转为 md5 */
58
+ declare function md5(str: string): string;
59
+ export { md5 };
57
60
  /**
58
61
  * 对象值转化为数组
59
62
  * @param obj 待转的对象
@@ -18,6 +18,7 @@ _export(exports, {
18
18
  params: ()=>params,
19
19
  responseResult: ()=>responseResult,
20
20
  getMD5: ()=>getMD5,
21
+ md5: ()=>md5,
21
22
  object2Array: ()=>object2Array,
22
23
  formatJson: ()=>formatJson,
23
24
  toJsonp: ()=>toJsonp,
@@ -100,6 +101,11 @@ function checkLogger() {
100
101
  });
101
102
  return _crypto.default.createHash("md5").update(JSON.stringify(conditions), "utf8").digest("hex");
102
103
  }
104
+ /**将一个输入字符串转为 md5 */ function md5(str) {
105
+ var md5 = _crypto.default.createHash("md5");
106
+ md5.update(str);
107
+ return md5.digest("hex");
108
+ }
103
109
  /**
104
110
  * 对象值转化为数组
105
111
  * @param obj 待转的对象
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x-9lab/xlab",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "9lab 服务端模块",
5
5
  "versionDesc": "静态文件服务支持跨域",
6
6
  "scripts": {