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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user