Last active
May 7, 2018 18:45
-
-
Save caderek/f2fc5e2443948865e5d06ea3e5b9e8ea 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
const objectFromEntries = entries => [...entries] | |
.reduce((obj, [key, val]) => ({ ...obj, [key]: val }), {}) | |
const formToObject = form => objectFromEntries(new FormData(form).entries()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment