mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-29 09:52:37 +01:00
Moo.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user