Last active
June 17, 2020 03:29
-
-
Save IgnacioCastro0713/d0806bca3f9a640e8aa9413514f83eff to your computer and use it in GitHub Desktop.
convert object to array
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* toArray(obj) { | |
for (let prop of Object.keys(obj)) | |
yield obj[prop]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment