1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-29 09:52:37 +01:00
This commit is contained in:
Kris Maglione
2012-01-12 01:30:36 -05:00
parent 9ef24af485
commit 5ad029e092
2 changed files with 9 additions and 2 deletions

View File

@@ -1571,10 +1571,17 @@ const Iter = Class("Iter", {
this.iter = iter;
if ("__iterator__" in iter)
this.iter = iter.__iterator__();
if (this.iter.finalize)
this.finalize = function finalize() this.iter.finalize.apply(this.iter, arguments);
},
next: function next() this.iter.next(),
send: function send() this.iter.send.apply(this.iter, arguments),
__iterator__: function () this.iter
})
});
/**
* Array utility methods.

View File

@@ -101,7 +101,7 @@ var Highlights = Module("Highlight", {
keys: function keys() Object.keys(this.highlight).sort(),
__iterator__: function () values(this.highlight).sort(function (a, b) String.localeCompare(a.class, b.class))
.iterValues().__iterator__(),
.iterValues(),
_create: function _create(agent, args) {
let obj = Highlight.apply(Highlight, args);