npm.io
1.0.31 • Published 5 years ago

globals-masks

Licence
ISC
Version
1.0.31
Deps
0
Size
5 kB
Vulns
0
Weekly
0

Globals Masks

Instalation

npm i globals-masks
or
yarn add globals-masks

Simple example

import { maskPhone } from 'globals-masks';

const value = "00000000000";

maskPhone(value); // (00) 0 0000-0000
Use as normalize
import { maskNumber } from 'globals-masks';

const value = "40fdl14399da";

maskNumber(value) // 4014399
Available masks
Name Entry value Return example
maskNumber 123abc456 123456
maskAccountBank 000000 00000-0
maskZipCode 00000000 00000-000
maskCurrency 100000 1.000,00
maskCnpj 00000000000000 00.000.000/0000-00
maskCpf 00000000000 000.000.000-00
maskDate 00000000 00/00/0000
maskPhone 00000000000 (00) 0 0000-0000
maskCreditCard 0000000000000000 0000 0000 0000 0000

Keywords