segundo intento ñ
This commit is contained in:
@@ -7,7 +7,7 @@ const escolares = async (numero) => {
|
||||
url: `${process.env.ESCOLARES}${numero}`,
|
||||
data: `${process.env.ESCOLARES_PASS}`,
|
||||
}).then((res) => {
|
||||
const nombre =
|
||||
let nombre =
|
||||
res.data.nombre && typeof res.data.nombre === 'string'
|
||||
? res.data.nombre.trim()
|
||||
: '';
|
||||
@@ -15,8 +15,8 @@ const escolares = async (numero) => {
|
||||
console.log(nombre);
|
||||
console.log(nombre.length);
|
||||
while (nombre.search('') != -1 && nombre.search('Ã') != -1) {
|
||||
nombre.replace = nombre.replace('Ã', 'Ñ');
|
||||
nombre.replace = nombre.replace('', ' ');
|
||||
nombre = nombre.replace('Ã', 'Ñ');
|
||||
nombre = nombre.replace('', ' ');
|
||||
}
|
||||
console.log(nombre);
|
||||
console.log(nombre.length);
|
||||
|
||||
Reference in New Issue
Block a user