Created
May 16, 2017 17:47
-
-
Save du5rte/81bc669eae8e934245f92a9bd89e4233 to your computer and use it in GitHub Desktop.
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
export default function formCollectionToPlainObject(HTMLFormControlsCollection) { | |
return Object.entries(HTMLFormControlsCollection).reduce((acc, [key, value]) => { | |
return { | |
...acc, | |
[key]: value.value | |
}; | |
}, {}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment