Step(
readSelf = -> fs.readFile __filename, @
capitalize = (err, text) ->
throw err if err
text.toUpperCase()
showIt = (err, newText) ->
throw err if err
console.log newText
)
Don t use converters ever. Your code can be corrupted after conversion.
For example code, which you can see in previous post is incorrect. Because expression
throw err if err?
产生:
if (typeof err !== "undefined" && err !== null) {
throw err;
}
I think it s not that you expect to see.
I use site of coffee creator for my experiments with coffee.
Don t use js2coffee site, there are some mistakes in conversion which can be critical. I had ones..
Good Luck!