Skip to content

Instantly share code, notes, and snippets.

@trobrock
Created February 17, 2011 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trobrock/832979 to your computer and use it in GitHub Desktop.
Save trobrock/832979 to your computer and use it in GitHub Desktop.
var paramify = function(hash){
var attrs = [];
for (var k in hash) {
attrs.push(k + "=" + hash[k]);
}
attrs = attrs.sort();
return attrs.join('&');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment