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.2.1
  • 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, inscrição estadual, ...)

Build Status

npm i js-brasil

ou

<script src="js-brasil.js"></script>

Módilos ValidateBR, MaskBR e FakerBR para nodejs ou browser.

Veja tudo em ação no Gerador Brasileiro - http://geradorbrasileiro.com/

ValidateBR

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

Node:

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>
<script>
var cpf = jsbrasil.validateBr.cpf('123.456.789-00');
</script>  

MaskBR

Formate seus dados com mascaras de tipos de dados brasileiros

Node:

const { maskBr } = require('js-brasil');
const cpf = maskBr.cpf('12345678900'); 
console.log(cpf) // '123.456.789-00'

Typescript:

import { maskBr } from 'js-brasil';
const cpf = maskBr.cpf('12345678900'); 
console.log(cpf) // '123.456.789-00'

Browser:

<script src="js-brasil.js"></script>
<script>
var cpf = jsbrasil.maskBr.cpf('12345678900'); 
console.log(cpf) // '123.456.789-00'
</script>  

FakerBR

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

Node:

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>
<script>
var cep = jsbrasil.fakerBr.cep();
</script>  

Tipos Suportados

Angular

Utilize em angular 6 com:

FAQs

Package last updated on 03 Apr 2019

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