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
function objectMap () { | |
return Object.defineProperty(Object.create(null), Symbol.iterator, { | |
configurable: true, // This descriptor is inspired by Map.prototype[Symbol.iterator] | |
writable: true, | |
value: function* () { | |
for (const key in this) { | |
yield [key, this[key]] | |
} | |
} | |
}) |
OlderNewer