validar-cpf
TypeScript icon, indicating that this package has built-in type declarations

3.1.1 • Public • Published

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.

Actions Status npm version Known Vulnerabilities

Install

npm install --save validar-cpf

Usage

const validateCpf = require('validar-cpf');

if (validateCpf('123.456.789-87')) {
	console.log('Valid CPF');
}

Package size

Install size Minified size Minified + gzip size

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i validar-cpf

Weekly Downloads

821

Version

3.1.1

License

MIT

Unpacked Size

3.9 kB

Total Files

4

Last publish

Collaborators

  • guilhermehn