tools-for-js 1.5.3 → 1.5.5
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/lib/utils/array.js +1 -1
- package/lib/utils/string.js +3 -2
- package/package.json +1 -1
package/lib/utils/array.js
CHANGED
|
@@ -43,7 +43,7 @@ var deWeightArray = exports.deWeightArray = function deWeightArray(list, key, ca
|
|
|
43
43
|
tempList.push(item);
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
-
IsType('Function', callback) && callback(tempList);
|
|
46
|
+
(0, _common.IsType)('Function', callback) && callback(tempList);
|
|
47
47
|
return _toConsumableArray(map.values()); //将map对象转换回数组再返回
|
|
48
48
|
};
|
|
49
49
|
|
package/lib/utils/string.js
CHANGED
|
@@ -314,9 +314,10 @@ var fromCode = exports.fromCode = function fromCode(params) {
|
|
|
314
314
|
arr[i] = b1 * len * len + b2 * len + b3; //利用索引值,反推被加密字符的Unicode编码值
|
|
315
315
|
}
|
|
316
316
|
// 将数组转换成字符串连接起来
|
|
317
|
-
|
|
317
|
+
// let str1 = arr.join(',')
|
|
318
318
|
//用fromCharCode()算出字符串
|
|
319
|
-
result = eval('String.fromCharCode(' + str1 + ')')
|
|
319
|
+
// result = eval('String.fromCharCode(' + str1 + ')')
|
|
320
|
+
result = String.fromCharCode.apply(String, arr);
|
|
320
321
|
return result; //返回被解密的字符串
|
|
321
322
|
};
|
|
322
323
|
|