1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-24 15:23:31 +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

@@ -36,14 +36,14 @@ var History = Module("history", {
// execute the query
let root = services.history.executeQuery(query, options).root;
root.containerOpen = true;
let items = util.map(util.range(0, root.childCount), function (i) {
let items = iter(util.range(0, root.childCount)).map(function (i) {
let node = root.getChild(i);
return {
url: node.uri,
title: node.title,
icon: node.icon ? node.icon.spec : DEFAULT_FAVICON
};
});
}).toArray();
root.containerOpen = false; // close a container after using it!
return items;