Skip to content
This repository was archived by the owner on Jan 17, 2021. It is now read-only.

Commit 9747439

Browse files
author
Low Yong Zhen
committed
0.1.3
1 parent 394e845 commit 9747439

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

demo/js/jquery.email-autocomplete.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* email-autocomplete - 0.1.2
2+
* email-autocomplete - 0.1.3
33
* jQuery plugin that displays in-place autocomplete suggestions for email input fields.
44
*
55
*
@@ -94,13 +94,11 @@
9494
return "";
9595
}
9696

97-
var pattern = new RegExp("^" + str, "i");
98-
9997
var match = this._domains.filter(function (domain) {
100-
return domain.match(pattern) !== null;
98+
return domain.indexOf(str) === 0;
10199
}).shift() || "";
102100

103-
return match.replace(pattern, "");
101+
return match.replace(str, "");
104102
},
105103

106104
autocomplete: function () {

dist/jquery.email-autocomplete.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* email-autocomplete - 0.1.2
2+
* email-autocomplete - 0.1.3
33
* jQuery plugin that displays in-place autocomplete suggestions for email input fields.
44
*
55
*
@@ -94,13 +94,11 @@
9494
return "";
9595
}
9696

97-
var pattern = new RegExp("^" + str, "i");
98-
9997
var match = this._domains.filter(function (domain) {
100-
return domain.match(pattern) !== null;
98+
return domain.indexOf(str) === 0;
10199
}).shift() || "";
102100

103-
return match.replace(pattern, "");
101+
return match.replace(str, "");
104102
},
105103

106104
autocomplete: function () {

dist/jquery.email-autocomplete.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "email-autocomplete",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "jQuery plugin that displays in-place autocomplete suggestions for email input fields.",
55
"keywords": [
66
"jquery-plugin",

0 commit comments

Comments
 (0)