Gathering detailed insights and metrics for cpf-check
Gathering detailed insights and metrics for cpf-check
Gathering detailed insights and metrics for cpf-check
Gathering detailed insights and metrics for cpf-check
@brazilian-utils/is-valid-cpf
Check if CPF is valid.
check-cpf
Ferramenta validadora de CPFs
c-check-cpf
API para checar se o cpf está registrado na receita federal
check-mask-inputs
Check Mask Inputs It is a library for validating and formatting numeric input data some pre-made formats and providing a customized format.
CPF Validator, Generator e Formatter, runs both on browser and server-side. Incredibly Small 2.2KB (447bytes gziped!!).
npm install cpf-check
Typescript
Module System
Node Version
NPM Version
TypeScript (98.59%)
JavaScript (1.41%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
14 Stars
103 Commits
3 Forks
1 Watchers
15 Branches
3 Contributors
Updated on Dec 08, 2024
Latest Version
3.0.0
Package Id
cpf-check@3.0.0
Unpacked Size
12.90 kB
Size
4.49 kB
File Count
9
NPM Version
6.7.0
Node Version
10.14.2
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Gerador, validador e formatador de CPF que roda tanto no navegador quanto no servidor. Super pequeno, apenas 447 Bytes gzipped.
(README available in english in README-en).
Instale a última versão do cpf-check:
npm install cpf-check --save
Agora é só usá-lo no seu index.html
1<script type="text/javascript" src="./node_modules/cpf-check/dist/index.umd.js"></script> 2// window.CPF
Ou importa-lo como um módulo:
1const CPF = require('cpf-check'); 2 3// ou, em ES6+ 4 5import CPF from 'cpf-check';
Esse módulo é compativel com o padrão UMD, portanto é compatível com o RequireJs, AMD, CommonJs 1 e 2, etc.
Assinatura do método:
1validate(algumCpf: any): boolean;
1import CPF, { validate } from 'cpf-check'; 2 3const algumCpf = '676.754.677-10'; 4 5CPF.validate(algumCpf); 6// « true 7 8validate(algumCpf); 9// « true 10 11validate('não-cpf'); 12// « false 13 14validate('12345678910'); 15// « false
Assinatura do método:
1generate(formatar?: boolean): string;
Esse método gera CPFs válidos.
1import CPF, { generate } from 'cpf-check'; 2 3CPF.generate(); 4// « '67675467710' 5 6generate(true); 7// « '676.754.677-10' 8 9generate(); 10// « '67675467710'
Assinatura do método:
1format(algumCpf: any): string;
Esse método adiciona pontuação a strings de CPFs.
1import CPF, { format } from 'cpf-check'; 2 3const meuCpf = '67675467710'; 4 5CPF.format(meuCpf); 6// « '676.754.677-10' 7 8format(meuCpf); 9// « '676.754.677-10' 10 11format('não-cpf'); 12// « ''
Assinatura do método:
1strip(algumCpf: any): string;
Esse método retira caracteres não numéricos de uma string.
1import CPF, { strip } from 'cpf-check'; 2 3const algumCpf = '676.754.677-10'; 4 5CPF.strip(algumCpf); 6// « '67675467710' 7 8strip(algumCpf); 9// « '67675467710'
Copyright (c) 2019 Marcel de Oliveira Coelho sob a Licença MIT. Go Crazy. :rocket:
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/10 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
77 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More