Package Exports
- imask
- imask/dist/imask
- imask/dist/imask.es
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (imask) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
imaskjs
vanilla javascript input mask
Features
- get and set raw and unmasked values easily
- no external dependencies
- RegExp mask
- Function mask
- Number mask (integer and decimal)
- Date mask (various format support)
- Dynamic/on-the-fly mask
- Pattern mask
- show placeholder always and only when necessary
- unmasked value can contain fixed parts
- optional input parts (greedy)
- React/Angular/Vue plugins
Further plans
- more unit tests
Install
npm install imask
and import IMask from 'imask';
or use CDN:
<script src="https://unpkg.com/imask"></script>
Build & test
npm run build
npm run test
Compatibility
Supports all major browsers and IE11+ need to support older?
Docs, Examples, Demo
https://unmanner.github.io/imaskjs/