Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
validator-brazil
Advanced tools
Este módulo permite a validação de CPF e CNPJ. Documentos unicamente brasileiros.
$ npm install validator-brazil --save
$ yarn add validator-brazil
import { isCpf } from "validator-brazil";
// No points or hyphens
console.log(isCpf("29018170097")); // false
console.log(isCpf("12312345600")); // false
// With points or hyphens
console.log(isCpf("123.123.456-00")); // false
import { isCnpj, isCpf, isCep } from "validator-brazil";
// No points or hyphens
console.log(isCnpj("54334068000136")); // true
console.log(isCnpj("00111222000100")); // false
// With points or hyphens
console.log(isCnpj("54.334.068/0001-36")); // true
import { isCep } from "validator-brazil";
// No points or hyphens
console.log(isCep("43710130")); // true
console.log(isCep("5471013423")); // false
// With points or hyphens
console.log(isCep("43710-130")); // true
const validator = require("validator-brazil");
// No points or hyphens
console.log(validator.isCnpj("54334068000136")); // true
console.log(validator.isCnpj("00111222000100")); // false
console.log(validator.isCpf("29018170097")); // true
console.log(validator.isCpf("12312345600")); // false
// With points or hyphens
console.log(validator.isCnpj("54.334.068/0001-36")); // true
console.log(validator.isCpf("123.123.456-00")); // false
FAQs
validacao de cpf e cnpj
The npm package validator-brazil receives a total of 911 weekly downloads. As such, validator-brazil popularity was classified as not popular.
We found that validator-brazil demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.