mailcheck-vue

vuejs wrapper for mailcheck
3,177 3
Install
npm install mailcheck-vue
Latest Version:1.0.4
License:MIT
Last Updated:Jan 3, 2023
Links: GitHub  ·  npm
Maintainer: ctf0

mailcheck-vue

npm npm

Installation

npm install mailcheck-vue --save

Usage

  • register the component

    window.Vue = require('vue')
    
    Vue.component('MailCheck', require('mailcheck-vue'))
    
  • now use it like

    <mail-check
        model-name="email"
        :data="email"
        :domains="['gmail.com', 'aol.com']"
        :topLevelDomains="['com', 'net', 'org']"
        :secondLevelDomains="['hotmail']"
        :distanceFunction="someFunction">
    
        <span>Did you Mean</span>
    </mail-check>
    
    prop required type default description
    modelName :white_check_mark: string the v-model key we should update on click
    data :white_check_mark: string the v-model value we want to check
    domains :x: array Mailcheck.domains mailcheck
    topLevelDomains :x: array Mailcheck.topLevelDomains mailcheck
    secondLevelDomains :x: array Mailcheck.secondLevelDomains mailcheck
    distanceFunction :x: function Mailcheck.sift4Distance mailcheck

# Why we need both data & modelName ?
to update the parent v-model without the need to use an EventBus, if someone have a better idea am all :ear:.


  • to style the result, use mail-check ex.
    .mail-check {
        cursor: pointer;
        color: red;
    }
    

Related Packages

vue

The progressive JavaScript framework for building modern web UI.

468,054,189 54,906
vue
eslint-plugin-vue

Official ESLint plugin for Vue.js

266,364,830 4,591
@vueuse/shared
260,835,866 22,398
@vitejs/plugin-vue

The official plugin for Vue SFC support in Vite.

257,315,514 686
@vueuse/core

Collection of essential Vue Composition Utilities

256,285,643 22,398

Version History

Version Released License
1.0.4 MIT
1.0.3 MIT
1.0.2 MIT
1.0.1 MIT
1.0.0 MIT