Skip to content

Instantly share code, notes, and snippets.

@Ulv
Created June 14, 2014 14:34
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 Ulv/c9623c0c69845241f3c5 to your computer and use it in GitHub Desktop.
Save Ulv/c9623c0c69845241f3c5 to your computer and use it in GitHub Desktop.
coffeescript encode query string
encodeQueryData = (data) ->
ret = []
for d of data
ret.push(encodeURIComponent(d) + "=" + encodeURIComponent(data[d]))
ret.join "&"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment