Skip to content

Instantly share code, notes, and snippets.

@nuysoft
Created December 11, 2013 09:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nuysoft/7907613 to your computer and use it in GitHub Desktop.
Save nuysoft/7907613 to your computer and use it in GitHub Desktop.
;
(function() {
$.extend({
unparam: function(param) {
if (param[0] === '?') param = param.slice(1)
var re = {}
for (var i = 0, arr = param.split('&'), kv; kv = arr[i]; i++) {
kv = kv.split('=')
re[kv[0]] = kv[1]
}
return re
}
})
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment