Created
February 14, 2017 20:52
-
-
Save s00d/5114cfe19ed1ee25d7d3bd000e8f3951 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
export default map => Array.isArray(map) | |
? map.map(key => ({ key, val: key })) | |
: Object.keys(map).map(key => ({ key, val: map[key] })) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment