Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomayac/js-input-masking-polyfill
Polyfill for the Intl.InputMask proposal.
https://github.com/tomayac/js-input-masking-polyfill
input-mask input-masking inputmask intl intl-inputmask
Last synced: 2 days ago
JSON representation
Polyfill for the Intl.InputMask proposal.
- Host: GitHub
- URL: https://github.com/tomayac/js-input-masking-polyfill
- Owner: tomayac
- Created: 2021-06-30T12:35:16.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-09T15:25:15.000Z (about 3 years ago)
- Last Synced: 2024-08-08T18:57:52.675Z (about 2 months ago)
- Topics: input-mask, input-masking, inputmask, intl, intl-inputmask
- Language: JavaScript
- Homepage: https://tomayac.github.io/js-input-masking-polyfill/demo/
- Size: 155 KB
- Stars: 9
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# js-input-masking-polyfill
A work-in-progress polyfill for the
[`Intl.InputMask`](https://github.com/tomayac/js-input-masking) 🎠proposal.**Do not use this in production, there are still many flaws.**
## Status
Unstable. Submitted as an [idea](https://es.discourse.group/t/input-masking/835)
to TC39.## Installation
```bash
npm install --save js-input-masking-polyfill
```## Usage
```js
import 'js-input-masking-polyfill';new Intl.InputMask('credit-card-number').format('4012888888881881');
// "4012 8888 8888 1881"// 15 digits.
new Intl.InputMask('credit-card-number').format('378282246310005');
// "3782 822463 10005"
```## Demo
You can see `Intl.InputMask` in action in the
[demo](https://tomayac.github.io/js-input-masking-polyfill/demo/).## License
Apache 2.0