Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MASCARATION

It is a simple string formatter

We have typescript definitions

To install:

npm i -S mascaration

The usage is very simple:

// mask to 88130-000
import {formatter, unmask} from 'mascaration';
const value = formatter('#####-###', '88130000');
// You can also use array of masks, it find the best match and uses it.
const comNonoDigito = formatter(['(##) #####-####', '(##) ####-####'], '2144440102');
const semNonoDigito = formatter(['(##) #####-####', '(##) ####-####'], '21944440102');
// unmask to 88130000
const value = unmask('88130-000');

About

It is a simple string formatter

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages