imask
Version:
vanilla javascript input mask
45 lines (33 loc) • 1.46 kB
Markdown
# imaskjs
vanilla javascript input mask
[](https://travis-ci.org/uNmAnNeR/imaskjs)
[](https://coveralls.io/github/uNmAnNeR/imaskjs?branch=gh-pages)
[](https://badge.fury.io/js/imask)
[](https://opensource.org/licenses/MIT)
## Features
* get and set raw and unmasked values easily
* no external dependencies
* show placeholder always and only when necessary
* unmasked value can contain fixed parts
* optional input parts (greedy)
* RegExp mask
* Functional mask
* Number mask (integer and decimal)
* Date mask (various format support)
Further plans:
* jQuery/Angular/React/Vue plugin
* on-the-fly/multimask
* more unit tests
* support RTL?
## Install
`npm install imask` or download and include from `dist` folder
## Build & test
`npm run build`
`npm run test`
## Compatibility
Supports all major browsers and IE11+ [need to support older?](https://unmanner.github.io/imaskjs/guide.html#support-older)
## Docs, Examples, Demo
[https://unmanner.github.io/imaskjs/](https://unmanner.github.io/imaskjs/)
## Many thanks to
[@Viktor Yakovlev](https://github.com/vcrazyV)
[@Alexander Kiselev](https://github.com/MaaKut)