mother-mask
TypeScript icon, indicating that this package has built-in type declarations

1.4.2 • Public • Published

mother-mask

The Mother-Mask is a simple and definitive Js library to implement text mask using a pattern.

How to Install

$ npm install mother-mask --save

How to Use

    // get the input element
    // vanilla javascript
    var phoneInputElement = document.getElementById("myphoneinput");
    // Jquery
    var phoneInputElement = $("#myphoneinput")[0];
 
    // bind the element with the mask
    MotherMask.bind(phoneInputElement, "999.999.999-99");
 
    // create dynamic mask
    MotherMask.bind(phoneInputElement, ["(99) 9999-9999", "(99) 99999-9999"]);
 

Simple Working demo

Working demo!

Readme

Keywords

Package Sidebar

Install

npm i mother-mask

Weekly Downloads

2

Version

1.4.2

License

MIT

Unpacked Size

44.9 kB

Total Files

17

Last publish

Collaborators

  • dan2dev