JSPM

  • Created
  • Published
  • Downloads 981349
  • Score
    100M100P100Q174683F
  • License MIT

vanilla javascript input mask

Package Exports

  • 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
  • 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?

Docs, Examples, Demo

https://unmanner.github.io/imaskjs/

Many thanks to

@Viktor Yakovlev

@Alexander Kiselev