UNPKG

jsbaseclass

Version:

A lightweight JavaScript base class for logging, event handling, and browser detection. Designed to simplify common tasks in frontend development.

14 lines (13 loc) 417 B
class ClassBrazilValidator extends JsBaseClass { async handle() { const cpf = '111.111.111-11'; const valid = this.brazil.isValidCpf(cpf); if (valid) { this.console.success(`🚀 ${cpf} is valid`); } else { this.console.error(`🚀 ${cpf} is invalid!!!`); } } } window.objBrazilValidator = new ClassBrazilValidator(); objBrazilValidator.init();