Skip to content

Instantly share code, notes, and snippets.

Last active September 26, 2017 06:30
What would you like to do?
Get params from url - javascript - ES6
.reduce((acc, param) => {
const [name, value] = param.split('=');
acc[name] = value;
return acc;
}, {});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment