Created
July 15, 2015 09:56
-
-
Save s-melnikov/b448f520090f52177598 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 params(str) { | |
| var res = {}; | |
| (str || location.search).replace(/^\?/, "").split("&").forEach(function(str) { | |
| str = str.split("="); | |
| res[str[0].toLowerCase()] = str[1] || true; | |
| }); | |
| return res; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment