Created
August 17, 2018 13:33
-
-
Save SadPandaBear/8f7114c305a4d974c7dc1e6f87d4ee8f 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
const queryStringToJSON = query => ( | |
query.slice(1).split('&').map(d => d.split('=')).reduce( | |
(acc, [head, tail]) => ({ ...acc, [head]: tail }), 0) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment