Translate js to coffee