It's a JS class to a easily validate CPF.
1 var cpf = new CPF('00000000000');
2 console.log(cpf.validate())
3 //false1 var cpf = new CPF('141.130.811-58');
2 console.log(cpf.validate())
3 //true- Import the library
<script src='./CPF.js' type="text/javascript"></script> - Instace an object
var cpf = new CPF('123.456.789-10', true); - You'll set two params:
- CPF: String
- Dev Mode: Boolean (default = false)
Dev Mode returns logs to your console and help you to debug possibles errors into code.
CONTACT ME ON INSTAGRAM: @dev.matheusguerra