validar-cpf
v3.1.1
Published
Validador de CPF
Downloads
2,051
Readme
validar-cpf
Validates Brazilian CPF document number using the "módulo 11" algorithm.
Anything in the input string that is not a number will be removed during the validation, so there is no need to sanitize the input beforehand.
Install
npm install --save validar-cpf
Usage
const validateCpf = require('validar-cpf');
if (validateCpf('123.456.789-87')) {
console.log('Valid CPF');
}
Package size
License
MIT