1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-24 04:22:26 +01:00

Iterate over structs as if they were arrays.

This commit is contained in:
Kris Maglione
2015-02-25 12:31:39 -08:00
parent e819e7616d
commit df904a6fbd

View File

@@ -1380,7 +1380,7 @@ var StructBase = Class("StructBase", Array, {
// Iterator over our named members
"@@iterator": function* struct__iterator__() {
for (let k of keys(this.members))
yield [k, this[k]];
yield this[k];
}
}, {
fromArray: function fromArray(ary) {