https://github.com/ctf0/mailcheck-vue
https://github.com/mailcheck/mailcheck port for vue
https://github.com/ctf0/mailcheck-vue
Last synced: about 1 year ago
JSON representation
https://github.com/mailcheck/mailcheck port for vue
- Host: GitHub
- URL: https://github.com/ctf0/mailcheck-vue
- Owner: ctf0
- License: mit
- Created: 2018-07-17T20:59:42.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T23:04:35.000Z (over 3 years ago)
- Last Synced: 2024-10-11T12:18:16.744Z (over 1 year ago)
- Language: Vue
- Size: 8.79 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
mailcheck-vue
## Installation
```bash
npm install mailcheck-vue --save
```
## Usage
- register the component
```js
window.Vue = require('vue')
Vue.component('MailCheck', require('mailcheck-vue').default)
```
- now use it like
```html
Did you Mean
```
| 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][docs] |
| topLevelDomains | :x: | array | Mailcheck.topLevelDomains | [mailcheck][docs] |
| secondLevelDomains | :x: | array | Mailcheck.secondLevelDomains | [mailcheck][docs] |
| distanceFunction | :x: | function | Mailcheck.sift4Distance | [mailcheck][docs] |
[docs]: https://github.com/mailcheck/mailcheck/blob/master/src/mailcheck.js
> \# 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.
```css
.mail-check {
cursor: pointer;
color: red;
}
```
### Security
If you discover any security-related issues, please email [ctf0-dev@protonmail.com](mailto:ctf0-dev@protonmail.com).