Skip to content

Instantly share code, notes, and snippets.

@chrisgoddard
Created June 24, 2018 16:36
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 chrisgoddard/206ab83057697e08a3575185d9300008 to your computer and use it in GitHub Desktop.
Save chrisgoddard/206ab83057697e08a3575185d9300008 to your computer and use it in GitHub Desktop.
object to query string
function buildQueryParams(params){
return Object.keys(params).map(function(key) {
return encodeURIComponent(key) + '=' + encodeURIComponent(params[key]);
}).join('&');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment