# br-input-masks

> Brazilian specific form input masks.

Latest version **1.0.3** (published 2020-04-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install br-input-masks
pnpm add br-input-masks
yarn add br-input-masks
bun add br-input-masks
```

## 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.3 |
| Published | 2020-04-03 |
| First published | 2020-02-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | João Ferreira @johnylab |
| Maintainers | johnylab |
| Keywords | form, input, masks |

## Links

- npm: https://www.npmjs.com/package/br-input-masks
- Repository: https://github.com/Johnylab/br-input-masks
- Homepage: https://github.com/Johnylab/br-input-masks#readme
- Issues: https://github.com/Johnylab/br-input-masks/issues
- npm.io page: https://npm.io/package/br-input-masks

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2020-04-03
- 1.0.1 — 2020-02-20
- 1.0.0 — 2020-02-20

## README

# br-input-masks - Brazilian input masks

Some input masks to Brazilian specific form data. This is intended to use in ES6 apps.

## Instructions

### Use it

Run `npm install --save br-input-masks` or `yarn add br-input-masks` in your project folder.

Import and use the masks in your ES6 web app (or React Native):

```
import { bindInputMask, bindMasksByAttribute, masks } from 'br-input-masks';

// Bind all input fields with a [data-mask] attribute.
bindMasksByAttribute();

// Pass your own custom config attribute.
bindMasksByAttribute('ng-input-mask');

// Bind a mask to a specific element.
const input = document.querySelector('#my-input');
bindInputMask(input, 'date', 'input');

// Just convert a string.
const tel = masks.tel('1355559292');
const cell = masks.tel('13955559292');
console.log(tel, cell); // (13) 5555-9292 (13) 95555-9292
```

Contributions are welcome!

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