aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorWilliam Cummings <will@wpc.io>2016-04-30 10:17:42 -0400
committerNik Nyby <nnyby@columbia.edu>2016-05-02 14:35:30 -0400
commit2505343492494b6bd2e99ba22e48e521cf965ccd (patch)
tree562df3cc0116c4693acca1ee6bb61b06c96a3378 /lib
parent2fe19c2f9f729eaa1969b9fbd6adc0f015d84f67 (diff)
downloadlibrejsxul-2505343492494b6bd2e99ba22e48e521cf965ccd.tar.lz
librejsxul-2505343492494b6bd2e99ba22e48e521cf965ccd.tar.xz
librejsxul-2505343492494b6bd2e99ba22e48e521cf965ccd.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/script_entries/crypto.js2
1 files changed, 1 insertions, 1 deletions
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) {