Skip to content

haystacks/imaskjs

 
 

Repository files navigation

imaskjs

vanilla javascript input mask

Build Status Coverage Status npm version License: MIT

Features

  • get and set raw and unmasked values easily
  • no external dependencies
  • RegExp mask
  • Functional 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)

Further plans

  • Angular/React/Vue plugins
  • more unit tests

Install

npm install imask and include from dist folder 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/

Many thanks to

@Viktor Yakovlev

@Alexander Kiselev

Packages

No packages published

Languages

  • JavaScript 51.7%
  • HTML 44.4%
  • TypeScript 2.4%
  • CSS 1.5%