Skip to content

Instantly share code, notes, and snippets.

@erichocean
Created August 10, 2009 20:09
Show Gist options
  • Save erichocean/165385 to your computer and use it in GitHub Desktop.
Save erichocean/165385 to your computer and use it in GitHub Desktop.
/** @private */
_appendQueryString: function(url, params) {
// very simple, does not handle arrays or objects, just takes a hashes of simple values
var name, queryString = [] ;
for (name in params) {
if (params.hasOwnProperty(name)) {
queryString.push("%@=%@".fmt(name,params[name]));
}
}
return [url, queryString.join('&')].join('?') ;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment