convert coffee to plain js