tools-for-js 1.5.4 → 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.
@@ -140,7 +140,7 @@ var decrypt = exports.decrypt = function decrypt(input, key) {
140
140
  }
141
141
  return output[1] || '';
142
142
  };
143
- console.log('测试:', decrypt('', 'www.kimshift.cn'));
143
+
144
144
  /*******
145
145
  * @description: 校验加密字符
146
146
  * @author: 琴时
@@ -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
- var str1 = arr.join(',');
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tools-for-js",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
4
4
  "description": "基于babel构建的javascript工具库",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {