5 ms·
Js2coffee: convert JavaScript to CoffeeScript
- joebeetee 14y agoAs a new coffeescripter, this is really interesting to be able to check syntax out - nice find
- benth 14y agoNeat. Some code does not round-trip. This JS terminates but if I convert the resulting CS back to JS, I get an infinite loop. function test() { var i; var countdown = function(n) { var i; for (var i = n; i > 0; i--) { console.log(i); } } for (var i = 0; i < 10; i++) { countdown(i); } } test();
- nkerkin 14y agoThis is a great resource that's been around for a little while. Excellent for starting out with CS or migrating existing projects.
- jeeyoungk 14y agoI use this all the time, except I don't like some of the syntaxes that it generates. I tend to avoid EXPR if COND EXPR unless COND type of code, because the order of execution isn't very clear.