Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

js-brasil

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-brasil

Javascript Utils para Brasil (cpf, cnpj...)

  • 1.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.5K
increased by72.65%
Maintainers
1
Weekly downloads
 
Created
Source

js-brasil

Javascript Utils para Brasil (cpf, cnpj...)

Validate

Verifique se os dados dos seus usuários são válidos

Javascript:

const { validateBr } = require('js-brasil');
const cpf = validateBr.cpf('123.456.789-00');

Typescript:

import { validateBr } from 'js-brasil';
const cpf = validateBr.cpf('123.456.789-00');

Browser:

<script src="js-brasil.js">
<script>
var cpf = jsbrasil.validateBr.cpf('123.456.789-00')
</script>  

Faker

Gere dados de teste usando tipos de dados brasileiro, similar o fakejs

Javascript:

const { fakerBr } = require('js-brasil');
const cep = fakerBr.cep();

Typescript:

import { fakerBr } from 'js-brasil';
const cep = fakerBr.cep();

Browser:

<script src="js-brasil.js">
<script>
var cep = jsbrasil.fakerBr.cep(')
</script>  

Tipos Suportados

  • cep
  • cnpj
  • cpf
  • currency
  • inscricaoestadual - Todos os estados do Brasil
  • percentage
  • rg
  • placa
  • telefone
  • time
  • titulo

FAQs

Package last updated on 19 Sep 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc