map js translated to coffeescript