1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-30 19:22:28 +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

@@ -29,12 +29,9 @@ var Marks = Module("marks", {
* @property {Array} Returns all marks, both local and URL, in a sorted
* array.
*/
get all() {
let lmarks = array(Iterator(this._localMarks.get(this.localURI) || {}));
let umarks = array(Iterator(this._urlMarks)).array;
return lmarks.concat(umarks).sort(function (a, b) String.localeCompare(a[0], b[0]));
},
get all() iter(this._localMarks.get(this.localURI) || {},
this._urlMarks
).sort(function (a, b) String.localeCompare(a[0], b[0])),
get localURI() buffer.focusedFrame.document.documentURI,