Skip to content

Instantly share code, notes, and snippets.

@rgrove
Forked from sh1mmer/gist:354941
Created April 3, 2010 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rgrove/354949 to your computer and use it in GitHub Desktop.
Save rgrove/354949 to your computer and use it in GitHub Desktop.
function buildQueryString(parameterMap) {
var params = [];
for (name in parameterMap) {
if (parameterMap.hasOwnProperty(name)) {
params.push(encodeURIComponent(name) + '=' + encodeURIComponent(parameterMap[name]));
}
}
return params.join('&');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment