Simple helper which help you add email autocompletion of popular email domain to your mail input fields.
npm install email-autocomplete --save
- ES2015 module import
import * as EmailAutocomplete from 'email-autocomplete';
let suggestedAddreses = EmailAutocomplete.search("test@gm");
- load via script tag
<script src="dist/email-autocomplete.min.js"></script>
let suggestedAddreses = EmailAutocomplete.search("test@gm");
- use UNPKG CDN
see UNPKG
$('#email-input').autocomplete({
minLength: 3,
source: function (request, response) {
response(EmailAutocomplete.search(request.term));
}
});