From 2505343492494b6bd2e99ba22e48e521cf965ccd Mon Sep 17 00:00:00 2001 From: William Cummings Date: Sat, 30 Apr 2016 10:17:42 -0400 Subject: Don't use array comprehensions "Non-standard. Do not use! The array comprehensions is non-standard, and it's unlikely to be added to ECMAScript. For future-facing usages, consider using Array.prototype.map, Array.prototype.filter, and arrow functions." https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Array_comprehensions --- lib/script_entries/crypto.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/script_entries/crypto.js') diff --git a/lib/script_entries/crypto.js b/lib/script_entries/crypto.js index d8d9c0a..ba73db3 100644 --- a/lib/script_entries/crypto.js +++ b/lib/script_entries/crypto.js @@ -41,7 +41,7 @@ CryptoString.prototype.encryptString = function(str) { var data = this.converter.convertToByteArray(str, result); this.cryptoHash.update(data, data.length); var hash = this.cryptoHash.finish(false); - return [this.toHexString(hash.charCodeAt(i)) for (i in hash)].join(""); + return hash.map(i => this.toHexString(hash.charCodeAt(i))).join(""); }; CryptoString.prototype.toHexString = function(charCode) { -- cgit v1.2.3