vue-inputmasked

1.3.4 • Public • Published

💿 Installation

npm i vue-inputmasked-2

Initialization

ES2015 (Webpack/Rollup/Browserify/etc)

import Vue from 'vue'
 
// As a plugin
import VueMask from 'vue-inputmasked'
Vue.use(VueMask);
 
// Or as a directive
import { VueMaskDirective } from 'vue-inputmasked'
Vue.directive('mask', VueMaskDirective);

🚀 Usage

<input type="text" v-mask="'####-##'" v-model="myInputModel">
<!-- OR -->
<input type="text" v-mask="nameOfVariableWithMask" v-model="myInputModel">

⚙️ Configs

List of supported placeholders:

Value Format
# Number (0-9)
A Letter in any case (a-z,A-Z)
N Number or letter
X Any symbol
? Optional (next character)

💉 Tests

Jest is used for unit-tests.

You can run tests by typing this command in your console:

npm test

⚓️ Semantic Versioning Policy

This plugin follows semantic versioning.

🔒 License

See the LICENSE file for license rights and limitations (MIT).

/vue-inputmasked/

    Package Sidebar

    Install

    npm i vue-inputmasked

    Weekly Downloads

    1

    Version

    1.3.4

    License

    none

    Unpacked Size

    32.1 kB

    Total Files

    26

    Last publish

    Collaborators

    • mikhail_p
    • pma87