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

brinput

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

brinput

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

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

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>

Keywords

FAQs

Package last updated on 26 Jan 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