js-text-mask
v0.0.1
Published
js mask on clear js, for dom elements or clear string
Downloads
14
Readme
js-text-mask
mask on clear js, which you can use on frontend and backend, on string or dom element
Table of Contents
Quick start
Install
We support all platforms.
npm
For module bundlers such as Webpack or Browserify.
npm i js-text-mask
Include with <script>
- Download lib
- Add script to html
<script src="js-text-mask.js"></script>
CDN
Recommended for learning purposes, you can use the latest version:
<script src="https://cdn.jsdelivr.net/npm/js-text-mask/dist/lib/js-text-mask.js"></script>
Recommended for production for avoiding unexpected breakage from newer versions:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/lib/js-text-mask.js"></script>
Demo
see demo
Methods
unmask
will clean text from mask, and return clear value
Params
maskedText
- Type:
string
- Description: text for mask
- Type:
maskSettings
- Type:
maskSettingsProps
- Description: setting for covering mask
- Type:
Returns
string
mask
covering value to mask, relative settings
Params
textForMaskInput
- Type:
string
- Description: text for mask
- Type:
maskSettings
- Type:
maskSettingsProps
- Description: setting for covering mask
- Type:
Returns
string
Author
webster6667