Convert coffeescript to js