1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-25 07:53:33 +01:00

Move iteration utility functions to the iter namespace.

This commit is contained in:
Kris Maglione
2011-01-02 16:56:18 -05:00
parent 91f02c9763
commit fbd7556a76
14 changed files with 261 additions and 183 deletions

View File

@@ -211,7 +211,9 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
addItem: function addItem(name, params) {
this.itemMap[name] = update(this.itemMap[name] || Item(name),
array([k, v] for ([k, v] in Iterator(params)) if (!callable(v))).toObject());
iter.toObject([k, v]
for ([k, v] in Iterator(params))
if (!callable(v))));
let names = set([name].concat(params.contains || []).map(function (e) "clear-" + e));
if (params.action)
@@ -315,7 +317,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
deny: 2,
session: 8
},
UNPERMS: Class.memoize(function () array.toObject([[v, k] for ([k, v] in Iterator(this.PERMS))])),
UNPERMS: Class.memoize(function () iter(this.PERMS).map(Array.reverse).toObject()),
COMMANDS: {
unset: "Unset",
allow: "Allowed",