Created
August 1, 2010 21:06
-
-
Save indexzero/503769 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
function parseQueryString(subject) { | |
var results = {}; | |
var parser = /[^&\?]+/g; | |
var match = parser.exec(subject); | |
while (match != null) { | |
var parts = match[0].split('='); | |
results[parts[0]] = parts[1]; | |
match = parser.exec(subject); | |
} | |
return results; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment