1.10.3 • Published 3 years ago

czmask v1.10.3

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

CzMask

Simple mask for inputs, JavaScript Vanilla

version npm version License: MIT

Install

  • NPM install npm install czmask
  • NPM use: import CzMask from 'czmask'

Usage

The inputs must have the attribute data-mask, and in this one having the mask, the variable value is represented by _ (underscore) optionally in the capture you can use the parameter mask

<input
  id="myId"
  type="text"
  data-mask="(+__) ___ ___ ___"
  placeholder="(+__) ___ ___ ___"
/>

Capturing a tag

CzMask({
  el: document.getElementById('myId') // selector
  mask: '__/__/____' // optional
})

Capturing all inputs, which have data-mask

document.querySelectorAll('input[data-mask]').forEach(tag => {
  CzMask({ el: tag })
})

Up a repo

  • Install dependencies npm install
  • Run dev server npm run serve

http://localhost:1234/

1.10.3

3 years ago

1.10.1

3 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.1

4 years ago

1.2.0

4 years ago

1.3.0

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago