mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-24 00:45:45 +01:00
Moo.
This commit is contained in:
@@ -1571,10 +1571,17 @@ const Iter = Class("Iter", {
|
|||||||
this.iter = iter;
|
this.iter = iter;
|
||||||
if ("__iterator__" in iter)
|
if ("__iterator__" in iter)
|
||||||
this.iter = iter.__iterator__();
|
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
|
__iterator__: function () this.iter
|
||||||
})
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array utility methods.
|
* Array utility methods.
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ var Highlights = Module("Highlight", {
|
|||||||
keys: function keys() Object.keys(this.highlight).sort(),
|
keys: function keys() Object.keys(this.highlight).sort(),
|
||||||
|
|
||||||
__iterator__: function () values(this.highlight).sort(function (a, b) String.localeCompare(a.class, b.class))
|
__iterator__: function () values(this.highlight).sort(function (a, b) String.localeCompare(a.class, b.class))
|
||||||
.iterValues().__iterator__(),
|
.iterValues(),
|
||||||
|
|
||||||
_create: function _create(agent, args) {
|
_create: function _create(agent, args) {
|
||||||
let obj = Highlight.apply(Highlight, args);
|
let obj = Highlight.apply(Highlight, args);
|
||||||
|
|||||||
Reference in New Issue
Block a user