{"_id":"@formio/vanilla-text-mask","_rev":"14-95a2c76a52fd09623da9f740598e5b88","name":"@formio/vanilla-text-mask","dist-tags":{"latest":"5.1.1-formio.1"},"versions":{"5.1.1":{"name":"@formio/vanilla-text-mask","version":"5.1.1","keywords":["text mask","input mask","string mask","input formatting","text formatting","string formatting"],"author":{"name":"M.K. Safi","email":"msafi@msafi.com"},"license":"Unlicense","_id":"@formio/vanilla-text-mask@5.1.1","maintainers":[{"name":"edwinanciani","email":"edwinanciani@gmail.com"},{"name":"travist","email":"travis@form.io"}],"homepage":"https://github.com/text-mask/text-mask/tree/master/vanilla/#readme","bugs":{"url":"https://github.com/text-mask/text-mask/issues"},"dist":{"shasum":"2bd690a34b0e191b7f23a589ff1c2497564307de","tarball":"https://registry.npmjs.org/@formio/vanilla-text-mask/-/vanilla-text-mask-5.1.1.tgz","fileCount":12,"integrity":"sha512-7MhrbMypySPi7RLchg0ys7HnS3Wqddbq/btAijKB1nA94TE7AOOLhpZJWcNm3kOlX0Y3nHfoavj/HP7vsvF34Q==","signatures":[{"sig":"MEUCIEh5o32+/ycswcn7xwjxj94Y2r0KoayeisTgoRJbouRBAiEAz7U8ezsOxZyNUyB/km6F10JUV0MFzBg19inQIyKB1iM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121316,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfb+ACRA9TVsSAnZWagAAVx8P/R9A7Z8ZaLLtC9mV/roG\nN3xuQy+yUJC67U8OTwaQgyFZme7FkvRfhNFGre3Qf/DOVq46Nf88uI8LvBE+\niQQIPHs9h1I+rjupmuIz7CD3fbTjXj1kfxxkGb69EMfghDVf4qV5GY2y8AlD\naDoNgy2Ii8I2kRjokgOr+WM4Fyu8cALvPPLIaOMAQVWYncf3h2S5e0S7dmNB\nNHdo74NIN5lDW6PRD3CcAIN5HvrqtZg9fENYgQmA6+gkZOgnPryQCSOvONJO\ngfMCssavcqV1iFXySwr18uVVrX6DSpG1uj6zO5/JuPqfkzrSn9ATjqTx+hFS\n+dzs6uzYbPl6EoTTCCGcwwNlb/eXsRzNQxib0lWLFRSAKn1vqpB7Pc3mEaEu\nr6V7jUGyxcoC26qPWnVgbAzfLE4/uBP9axRAmK0U3fJ7s6Zd4ojWH31AwpQa\n2jlbSAWfU+Gs7CrMS0GCWw8Jlw6P6mc/OlVtZEPHxZC+Lq+bKgzJAWKLdrOs\n49JTAu4OM/Vn7zLVlfz5HvnGDNy15d9UESR7TDomGyrz9n/99yr0B4gDcK87\nm/zWZavVJC2HYJwDPWjtB4QuiQzx4PosOPIs0XOM7+4zImq8DV7Zumej5lC9\nsSEv4uptVDVnan0sNLxM2+M3BRLHZwRq5i190odE4PmFXfbBcq6RuuuqHP8U\nx9CE\r\n=7N6R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/vanillaTextMask.js","_npmUser":{"name":"travist","email":"travis@form.io"},"repository":{"url":"git+https://github.com/text-mask/text-mask.git","type":"git"},"_npmVersion":"6.14.12","description":"JavaScript function that makes input HTML element accept mask pattern","directories":{},"_nodeVersion":"12.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/vanilla-text-mask_5.1.1_1618853759672_0.12375553771702807","host":"s3://npm-registry-packages"}},"5.1.1-formio.1":{"name":"@formio/vanilla-text-mask","version":"5.1.1-formio.1","keywords":["text mask","input mask","string mask","input formatting","text formatting","string formatting"],"author":{"name":"M.K. Safi","email":"msafi@msafi.com"},"license":"Unlicense","_id":"@formio/vanilla-text-mask@5.1.1-formio.1","maintainers":[{"name":"lane-formio","email":"lane@form.io"},{"name":"tanyagashtold","email":"tanya@form.io"},{"name":"edwinanciani","email":"edwinanciani@gmail.com"},{"name":"travist","email":"travis@form.io"}],"homepage":"https://github.com/text-mask/text-mask/tree/master/vanilla/#readme","bugs":{"url":"https://github.com/text-mask/text-mask/issues"},"dist":{"shasum":"f53fc7f4cb37c6ae38f2857488055e781e5adba9","tarball":"https://registry.npmjs.org/@formio/vanilla-text-mask/-/vanilla-text-mask-5.1.1-formio.1.tgz","fileCount":12,"integrity":"sha512-rYBlvIPMNUd6sAaduOaiIwI4vfTAjHDRonko2qJn2RP1O//TQ7rcFIPYVYePJZ4OtOpwHiHAvAIh79McphZotQ==","signatures":[{"sig":"MEUCIESbuk0726GnKRCg9JyQrtTpAkh2VKCLNAJiqB29D0tIAiEA4UOIEyojudZBaGfGYDuaiZfd3tq0YqP59t52eNMbVo0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121578,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjINomACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmopgBAAgCHhZtdsjLpqfmXja776pDn2/dOj4AQ+xjs7qIMQRpKdf5dP\r\nmhaFY7mDiUzljet+jXkLIWeRhMMJRNGF+2T76CQfKO2Pf4nuC1ZBPTWvvxIO\r\naoUPMbIvesZCNUa3xpOR2T1ANMJmn5+qDzTUU5Xyr2lMM4oOxkMkfpvC2lha\r\nkpnhjr8iSMo6tqEc3A3ZuCJzh1NcbBzgqSpyWir8pFrZrv4Hp9qrPsQBxWqv\r\nW18hm9koXfXzFmGEuwvFahDadLSpuuREoryxM150z6Soxpd4ynhQMpfendVS\r\nukXZ5MI+s6AonauvG40A4IWe26Du9eM0spXFCPL/0RDRLwgxbmPtg7SL5dEw\r\nuDcjOHQPUZTFrbDC6ulceLAS8W89jbDZPzgiKxh/Z+WFdv1T0813RRZkrliP\r\nXue0JYcOXVOHsFEIFvJk6j5JkMd6mjcEHzeRmk6CXsaF+dvnQzf4IEBm4L2f\r\n8vs+f4WL0ipKRoh0haXj6OwghAxYMXCUD5rL2lmJYTX/dEtLHyNs9TZ9SfJM\r\nHNm8Ly8hxvbOPR5g7Tb/jUU4SPOi4ES97HP9ZWiyv/GJMXnoQYikfTrErLQp\r\n7sRs1qtiEKH+pYuqAyITuwdI6o/ov3M0G+qcbS8czgeS2PKQPVxnrw/GcPH1\r\nIerkKLO5C+RdTk97BWgks+mP0KjTbSaomJ8=\r\n=PE6S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/vanillaTextMask.js","_npmUser":{"name":"travist","email":"travis@form.io"},"repository":{"url":"git+https://github.com/text-mask/text-mask.git","type":"git"},"_npmVersion":"6.14.15","description":"JavaScript function that makes input HTML element accept mask pattern","directories":{},"_nodeVersion":"14.18.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/vanilla-text-mask_5.1.1-formio.1_1663097382299_0.035819062607759244","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-04-19T17:35:59.471Z","modified":"2025-05-23T15:43:52.398Z","5.1.1":"2021-04-19T17:35:59.922Z","5.1.1-formio.1":"2022-09-13T19:29:42.545Z"},"bugs":{"url":"https://github.com/text-mask/text-mask/issues"},"author":{"name":"M.K. Safi","email":"msafi@msafi.com"},"license":"Unlicense","homepage":"https://github.com/text-mask/text-mask/tree/master/vanilla/#readme","keywords":["text mask","input mask","string mask","input formatting","text formatting","string formatting"],"repository":{"url":"git+https://github.com/text-mask/text-mask.git","type":"git"},"description":"JavaScript function that makes input HTML element accept mask pattern","maintainers":[{"email":"edwinanciani@gmail.com","name":"edwinanciani"},{"email":"travis@form.io","name":"travist"},{"email":"lane@form.io","name":"lane-formio"},{"email":"tanya@form.io","name":"tanyagashtold"},{"email":"alexey.nikipelau@form.io","name":"alexeynikipelau"},{"email":"brendanbond@gmail.com","name":"brendanbond"},{"email":"johnt@form.io","name":"johnformio"}],"readme":"# JavaScript Input Mask\n\n**Note:** IE9 is not supported in this module.\n\n## Getting started\n\nFirst, install it.\n\n```bash\nnpm i vanilla-text-mask --save\n```\n\nThen, use it as follows:\n\n```html\n<script\n  type=\"text/javascript\"\n  src=\"./node_modules/vanilla-text-mask/dist/vanillaTextMask.js\"></script>\n<script type=\"text/javascript\">\n  var phoneMask = ['(', /[1-9]/, /\\d/, /\\d/, ')', ' ', /\\d/, /\\d/, /\\d/, '-', /\\d/, /\\d/, /\\d/, /\\d/]\n\n  // Assuming you have an input element in your HTML with the class .myInput\n  var myInput = document.querySelector('.myInput')\n\n  var maskedInputController = vanillaTextMask.maskInput({\n    inputElement: myInput,\n    mask: phoneMask\n  })\n  \n  // Calling `vanillaTextMask.maskInput` adds event listeners to the input element. \n  // If you need to remove those event listeners, you can call\n  maskedInputController.destroy()\n</script>\n```\n\n## Documentation\n\nAs you can see in the code above, you are passing an object to `vanillaTextMask.maskInput(...)`.\n\nThe object takes `inputElement`, which is the `<input/>` element that you are masking. It also\naccepts other values which are\n[documented here](https://github.com/text-mask/text-mask/blob/master/componentDocumentation.md#readme).\n\n## Example\n\nTo see an example of the code running, follow these steps:\n\n1. Clone the repo, `git clone git@github.com:text-mask/text-mask.git`\n1. `cd text-mask`\n1. `npm install`\n1. `npm run vanilla:dev`\n1. Open [http://localhost:3000](http://localhost:3000)\n\nThe code of the example is in [`vanilla/example`](https://github.com/text-mask/text-mask/tree/master/vanilla/example).\n\n## Contributing\n\nWe would love some contributions! Check out [this document](https://github.com/text-mask/text-mask/blob/master/howToContribute.md#readme) to get started.\n","readmeFilename":"README.md"}