js2coffee
Version:
JavaScript to CoffeeScript compiler
27 lines (24 loc) • 393 B
Plain Text
notes: """
Having a return of an object without braces is ambiguous:
> ```
> return
> a: 1
> b: 2
> ```
CoffeeScript and CoffeeScriptRedux will both choke on this. Js2coffee will
put braces around the object to make it work.
"""
----
function fn() {
if (x)
return { a: 1, b: 2 };
return true;
}
----
fn = ->
if x
return {
a: 1
b: 2
}
true