This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const makeIterable = obj => Object.defineProperty(obj, Symbol.iterator, { | |
writable: true, | |
value: function*() { | |
const values = Object.values(obj); | |
for (let value of values) { | |
yield value; | |
} | |
}, | |
}); |