-
-
Save olitomas/ffafd61f96f6fb82f628be69daf9fe22 to your computer and use it in GitHub Desktop.
ParseUrl.js
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
var parseQueryString = function(url) { | |
var urlParams = {}; | |
url.replace( | |
new RegExp("([^?=&]+)(=([^&]*))?", "g"), | |
function($0, $1, $2, $3) { | |
urlParams[$1] = $3; | |
} | |
); | |
return urlParams; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment