Created
May 10, 2016 13:15
-
-
Save kino90/ec471019668cde2d16ebdd257255fc6a 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
var getQueryString = function (queryString) { | |
var query = (queryString || window.location.search).substring(1); // delete ? | |
if (!query) { | |
return false; | |
} | |
return _ | |
.chain(query.split('&')) | |
.map(function(params) { | |
var p = params.split('='); | |
return [p[0], decodeURIComponent(p[1])]; | |
}) | |
.fromPairs() | |
.value(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment