- prima bozza catalogo

This commit is contained in:
Surya Paolo
2024-12-02 19:37:53 +01:00
parent 351b81308a
commit c914555a5f
6 changed files with 295 additions and 84 deletions

View File

@@ -4387,6 +4387,20 @@ module.exports = {
return parseInt(version);
},
convstrToInt(mystr) {
try {
const parsed = parseInt(mystr, 10); // Specifica la base come 10
return isNaN(parsed) ? 0 : parsed; // Restituisce 0 se il valore è NaN
} catch (e) {
return 0; // Se c'è un errore, restituisce 0
}
},
isValidNumber(value) {
// Controlla se il valore è un numero valido
return !isNaN(value) && value !== null && value !== '';
},
invertescapeslash(mystr) {
return mystr.replace(/Ç/g, '/');
},