DEV Community

marcosguilhermef
marcosguilhermef

Posted on

Documentação do documento-validacao-br

documento validacao br

Instalação

npm install -f documento-validacao-br

Como usar o gerador de CPF?

import { GerarCPF } from "documento-validacao-br";

const value = (new GerarCPF()).execute()
Enter fullscreen mode Exit fullscreen mode

Como usar o validador de CPF?

import { ValidarCPF } from "documento-validacao-br";

const value = (new ValidarCPF()).execute()
Enter fullscreen mode Exit fullscreen mode

Gerar CPF com mascara

import { GerarCPF } from "documento-validacao-br";

const mask = 'xxx.xxx.xxx-xx'
const value = (new GerarCPF(mask)).execute()
Enter fullscreen mode Exit fullscreen mode

Usando require

const { GerarCPF } = require("documento-validacao-br")

var cpf = new GerarCPF().execute()


Enter fullscreen mode Exit fullscreen mode

Validar CNPJ



import { ValidarCNPJ } from "./";

let cnpj = new ValidarCNPJ('000000000000000').execute()

console.log(validate)
Enter fullscreen mode Exit fullscreen mode

Todas as ferramentas deste pacote são usados no toolsfordevs.com.br. Acesse para dar uma conferida e um crédito ao projeto.

Heroku

Deploy with ease. Manage efficiently. Scale faster.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (0)

Playwright CLI Flags Tutorial

5 Playwright CLI Flags That Will Transform Your Testing Workflow

  • 0:56 --last-failed: Zero in on just the tests that failed in your previous run
  • 2:34 --only-changed: Test only the spec files you've modified in git
  • 4:27 --repeat-each: Run tests multiple times to catch flaky behavior before it reaches production
  • 5:15 --forbid-only: Prevent accidental test.only commits from breaking your CI pipeline
  • 5:51 --ui --headed --workers 1: Debug visually with browser windows and sequential test execution

Learn how these powerful command-line options can save you time, strengthen your test suite, and streamline your Playwright testing experience. Click on any timestamp above to jump directly to that section in the tutorial!

Watch Full Video 📹️

👋 Kindness is contagious

DEV shines when you're signed in, unlocking a customized experience with features like dark mode!

Okay