https://github.com/incuca/text-mask-collection
Repository of pre-made input masks
https://github.com/incuca/text-mask-collection
mask text-mask vue
Last synced: 4 months ago
JSON representation
Repository of pre-made input masks
- Host: GitHub
- URL: https://github.com/incuca/text-mask-collection
- Owner: InCuca
- License: mit
- Created: 2018-04-03T20:50:43.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-13T16:18:03.000Z (over 7 years ago)
- Last Synced: 2024-04-26T18:46:42.679Z (over 2 years ago)
- Topics: mask, text-mask, vue
- Language: JavaScript
- Size: 174 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# text-mask-collection
[](https://travis-ci.org/InCuca/text-mask-collection/branches) [](https://codeclimate.com/github/InCuca/text-mask-collection/test_coverage)
[](https://codeclimate.com/github/InCuca/loopback-chai/maintainability)
Repository of pre-made input masks
To be used with [text-mask](https://github.com/text-mask/text-mask) with support for Vanilla, Vue, Angular, React and more.
## Usage with Vue
The plugin exposes three properties `$mask`, `$unmask` and `$format` with functions mask/unmask and transform according each respective mask.
```js
import Vue from 'vue';
import {VueTextMasks} from 'text-mask-collection';
import VueTextMask from 'vue-text-mask';
Vue.use(VueTextMasks);
Vue.component('m-input', VueTextMask);
new Vue({
template: `
Value: {{$format.centimeters(rawValue)}}
`,
data() {
return {rawValue: 100}
},
});
```