Created
December 19, 2017 08:38
-
-
Save AaronFlower/a386f6553176e30df6e0863b7d17e309 to your computer and use it in GitHub Desktop.
window location search params
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
var queryItems = {} | |
window.location.search.replace(/[?&]([^=]+)=([^=&]+)/g, function (_, key, value) { | |
queryItems[key] = value | |
}) | |
console.log(queryItems) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment