Giter VIP home page Giter VIP logo

gerador-validador-cpf's Introduction

Gerador e Validador de CPF Open Source Love

LIKED ? Leave a : 😞

Release Downloads install size js-standard-style npm type definitions License

Build Status Coverage Status Mutation testing cover Inline docs devDependencies Status

JS open-source lib to generate, validate and formate CPF.

The tool can be accessed on tiagoporto.github.io/gerador-validador-cpf.

Read this in other languages: English, Português(Brasil)

Topics

Installation

npm install gerador-validador-cpf@beta --save

Generate CPF

import { generate as generateCPF } from "gerador-validador-cpf";

generateCPF([formatOption]);

Check format options

Validate CPF

import { validate as validateCPF } from "gerador-validador-cpf";

validateCPF("123.456.789-00");

Note: characters like ., - and space are allowed.

Formate CPF

import { format as formatCPF } from "gerador-validador-cpf";

formatCPF("123.456.789-00", [formatOption]);

Check format options

Note: characters like ., - and space are allowed.

Format options

Default
import { format as formatCPF } from "gerador-validador-cpf";

formatCPF("12345678901");

Generates a CPF in the format xxx.xxx.xxx-xx

Digits
import { format as formatCPF } from "gerador-validador-cpf";

formatCPF("123.456.789-01", "digits");

Generates a CPF in the format xxxxxxxxxxx

Checker
import { format as formatCPF } from "gerador-validador-cpf";

formatCPF("12345678901", "checker");

Generates CPF in the format xxxxxxxxx-xx

Contribute

How to contribute.

Donation

This project is developed in my free time, donations are welcome.

Donate Donate

License

Gerador e validador de CPF is released under the terms of the MIT license.

gerador-validador-cpf's People

Contributors

tiagoporto avatar odahcam avatar almino avatar evertramos avatar iagomelanias avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.