I would like to know what is the best way to refactor this code so that it is less repeated.
if($('#edit-tipo-documento').exists()){
$('head').append('<meta name="TagAutomataAccion1" content="home">')
}
if($('.linea_restablecer').exists()){
$('head').append('<meta name="TagAutomataAccion1" content="restablecer contraseña">')
}
if($('#edit-contrasena1').exists()){
$('meta[name=TagAutomataAccion1]').attr("content", 'homeCampaña');
}