-
-
Save hanachin/1409828 to your computer and use it in GitHub Desktop.
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
# 1 | |
data = if obj.data? then ("#{key}=#{value}" for key, value of obj.data).join "&" else null | |
# 2 | |
data = if obj.data? | |
("#{key}=#{value}" for key, value of obj.data).join "&" | |
else | |
null | |
# 3 | |
data = if obj.data? | |
(for own key, value of obj.data | |
"#{key}=#{value}" | |
).join "&" | |
else | |
null | |
# 4 | |
data = ((("#{key}=#{value}" for key, value of obj.data).join "&" if obj.data?) ? null) | |
# 5 | |
data = ("#{key}=#{value}" for key, value of obj.data).join "&" if obj.data? | |
data ?= null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment