# brinput

> A tiny plugin made with vanilla js for some of brazilian input information type, such: CPF, CNPJ, CEP and Phone Number

Latest version **1.0.6** (published 2018-01-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install brinput
pnpm add brinput
yarn add brinput
bun add brinput
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2018-01-26 |
| First published | 2018-01-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Lucas Caires |
| Maintainers | lucascaires |
| Keywords | mascara, cep, cpf, cnpj, telefone |

## Links

- npm: https://www.npmjs.com/package/brinput
- Repository: https://github.com/lucascaires/brinput
- Homepage: https://github.com/lucascaires/brinput#readme
- Issues: https://github.com/lucascaires/brinput/issues
- npm.io page: https://npm.io/package/brinput

## Recent versions

- 1.0.6 (latest) — 2018-01-26
- 1.0.5 — 2018-01-26
- 1.0.4 — 2018-01-26
- 1.0.3 — 2018-01-22
- 1.0.2 — 2018-01-22
- 1.0.1 — 2018-01-22

## README

# BR Input

Plugin extremamente leve (pouco mais de 1KB) com as principais máscaras para formulários de campos utilizados exclusivamente no Brasil (CPF, CNPJ, CEP, Telefone)

# Como instalar

**Instale via NPM**

    npm install brinput

**Importe**

    import brInput from 'brinput'

**Se preferir, use require**

    const brInput = require('brinput').default



## Via CDN

Você também pode optar por usá-lo via CDN. Apenas inclua o seguinte código em sua página.

    <script src="https://cdn.jsdelivr.net/npm/brinput/dist/brinput.min.js"></script>


# Como utilizar

Instancie um objeto brInput

    <script>
        new brInput()
    </script>

## Exemplo de Utilização via atributo

    <input type="text" placeholder="(00) 00000-0000" br-input="telefone">
    
    <input type="text" placeholder="00000-000" br-input="cep">
    
    <input type="text" placeholder="000.000.000-00" br-input="cpf">
    
    <input type="text" placeholder="00.000.000/0000-00" br-input="cnpj">
    

## Ou sete seus campos no construtor do objeto, por exemplo:

    <script>
        new brInput({
            telefone: '#telefone',
            cep: '#cep',
            cnpj: '#cnpj',
            cpf: '#cpf'
        })
    </script>

---
_Source: https://npm.io/package/brinput · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
