mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
now .images itself is iterable...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
dfa9693c58
commit
5ed2c02032
@ -433,7 +433,8 @@ module.ImagesPrototype = {
|
||||
res = func.call(this[key], res, this[key], key, i++, this) }
|
||||
return res },
|
||||
|
||||
iter: function*(){
|
||||
// make images iterable...
|
||||
[Symbol.iterator]: function*(){
|
||||
for(var key in this){
|
||||
// reject non images...
|
||||
// XXX make this cleaner...
|
||||
@ -442,6 +443,9 @@ module.ImagesPrototype = {
|
||||
|| this[key] instanceof Function){
|
||||
continue }
|
||||
yield [key, this[key]] } },
|
||||
iter: function*(){
|
||||
for(e of this){
|
||||
yield e } },
|
||||
|
||||
// XXX remove version...
|
||||
keys: function(){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user