mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-22 15:05:45 +01:00
Iterate over structs as if they were arrays.
This commit is contained in:
@@ -1380,7 +1380,7 @@ var StructBase = Class("StructBase", Array, {
|
|||||||
// Iterator over our named members
|
// Iterator over our named members
|
||||||
"@@iterator": function* struct__iterator__() {
|
"@@iterator": function* struct__iterator__() {
|
||||||
for (let k of keys(this.members))
|
for (let k of keys(this.members))
|
||||||
yield [k, this[k]];
|
yield this[k];
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
fromArray: function fromArray(ary) {
|
fromArray: function fromArray(ary) {
|
||||||
|
|||||||
Reference in New Issue
Block a user