Mask
The simple and tiny script for input mask
Install
$ npm i -S @tadashi/mask
Usage
Codepen example: https://codepen.io/lagden/pen/XzLYJE
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no">
<title>Example</title>
</head>
<body>
<input id="telefone" type="text" data-mask="(99) 9-9999-9999">
<script type="module">
import Mask from './node_modules/@tadashi/mask/dist/index.js'
const mask = new Mask(telefone)
</script>
</body>
</html>
License
MIT © Thiago Lagden