1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-23 12:13:31 +01:00

Get rid of most remaining comprehensions.

This commit is contained in:
Kris Maglione
2015-12-20 15:53:43 -08:00
parent 0aba8fb619
commit 916ea412a5
34 changed files with 372 additions and 256 deletions

View File

@@ -18,10 +18,10 @@ lazyRequire("resource://gre/modules/DownloadUtils.jsm", ["DownloadUtils"]);
var MAX_LOAD_TIME = 10 * 1000;
let prefix = "DOWNLOAD_";
var states = iter([v, k.slice(prefix.length).toLowerCase()]
for ([k, v] of iter(Ci.nsIDownloadManager))
if (k.startsWith(prefix)))
.toObject();
var states = Ary.toObject(
Object.entries(Ci.nsIDownloadManager).filter(([key]) => key.startsWith(prefix))
.map(([key, val]) => [val,
key.slice(prefix.length).toLowerCase()]));
var Download = Class("Download", {
init: function init(download, list) {