0.0.1 • Published 3 years ago

js-text-mask v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

js-text-mask

mask on clear js, which you can use on frontend and backend, on string or dom element

npm version npm.io

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>

  1. Download lib
  2. 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/js-text-mask@0.0.0/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
  • maskSettings
    • Type: maskSettingsProps
    • Description: setting for covering mask

Returns

  • string

mask

covering value to mask, relative settings

Params

  • textForMaskInput
    • Type: string
    • Description: text for mask
  • maskSettings
    • Type: maskSettingsProps
    • Description: setting for covering mask

Returns

  • string

Author

webster6667