Skip to content

Instantly share code, notes, and snippets.

@Francescu
Created March 9, 2015 15:09
Show Gist options
  • Save Francescu/2dfe97f9bc2f4470c2ba to your computer and use it in GitHub Desktop.
Save Francescu/2dfe97f9bc2f4470c2ba to your computer and use it in GitHub Desktop.
URL Query String from Params in CoffeeScript
queryString = (params) ->
_.map params, (value, key) ->
encodeURIComponent(key) + "=" + encodeURIComponent(value)
.join("&").replace(/%20/g, "+")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment