Skip to content

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

License

Notifications You must be signed in to change notification settings

dan2dev/mother-mask

Repository files navigation

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!

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published