+1
-1
| { | ||
| "name": "mx-tool", | ||
| "version": "1.0.14", | ||
| "version": "1.0.15", | ||
| "description": "#### Description 提供摩西的标准时间 等基础能力", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -14,2 +14,3 @@ "use strict"; | ||
| exports.AwaitCall = void 0; | ||
| const crypto_1 = require("crypto"); | ||
| const CacheMoudle_1 = require("./CacheMoudle"); | ||
@@ -74,8 +75,10 @@ class AwaitUnit { | ||
| if (posList.length == 0) { | ||
| key += JSON.stringify(args); | ||
| key += crypto_1.createHash("md5").update(JSON.stringify(args)).digest("hex"); | ||
| } | ||
| else { | ||
| let useFullList = []; | ||
| for (let i = 0; i < posList.length; i++) { | ||
| key += (posList[i] || "").toString(); | ||
| useFullList.push(posList[i]); | ||
| } | ||
| key += crypto_1.createHash("md5").update(JSON.stringify(useFullList)).digest("hex"); | ||
| } | ||
@@ -82,0 +85,0 @@ return awaitCall(key, function () { |
| // 提供一个异步同时等待的方法 | ||
| import { createHash } from "crypto"; | ||
| import { CacheMoudle } from "./CacheMoudle"; | ||
@@ -69,8 +70,10 @@ | ||
| if (posList.length == 0) { | ||
| key += JSON.stringify(args) | ||
| key += createHash("md5").update(JSON.stringify(args)).digest("hex") | ||
| } | ||
| else { | ||
| let useFullList = []; | ||
| for (let i = 0; i < posList.length; i++) { | ||
| key += (posList[i] || "").toString() | ||
| useFullList.push(posList[i]) | ||
| } | ||
| key += createHash("md5").update(JSON.stringify(useFullList)).digest("hex") | ||
| } | ||
@@ -77,0 +80,0 @@ |
161977
0.25%3658
0.16%