Created
March 9, 2015 15:09
-
-
Save Francescu/2dfe97f9bc2f4470c2ba to your computer and use it in GitHub Desktop.
URL Query String from Params in CoffeeScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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