Created
July 17, 2020 19:08
-
-
Save davelnewton/4b4b537e5771938f2a91eeabdb605f06 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 ret = str.split('&').reduce((acc, vars) => { | |
const [key, val] = vars.split('=').map(decodeURIComponent) | |
console.log('fromURLQuery', { key, val }) | |
acc[key] = val | |
return acc | |
}, {}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment