Inline and simplify JS
This commit is contained in:
parent
726f32c4dd
commit
7ca7f6b506
184
index.html
184
index.html
File diff suppressed because one or more lines are too long
|
@ -71,9 +71,8 @@ const jaro_winkler = function (a, b, options) {
|
|||
}
|
||||
|
||||
// Short-circuit if not matches found
|
||||
if (m === 0) {
|
||||
if (m === 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Count transpositions
|
||||
let k = 0;
|
||||
|
@ -81,7 +80,8 @@ const jaro_winkler = function (a, b, options) {
|
|||
|
||||
for (let i = 0; i < aLen; i++) {
|
||||
if (aMatches[i] === true) {
|
||||
for (let j = k; j < bLen; j++) {
|
||||
let j;
|
||||
for (j = k; j < bLen; j++) {
|
||||
if (bMatches[j] === true) {
|
||||
k = j + 1;
|
||||
break;
|
164
js/main.js
164
js/main.js
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue