Skip to content
This repository was archived by the owner on May 1, 2023. It is now read-only.

Commit 106f312

Browse files
committed
Merge branch 'bugfix/ie_support' of https://github.com/ludo97240/string-similarity into ludo97240-bugfix/ie_support
2 parents e09e465 + 1044eb7 commit 106f312

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: src/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
2-
compareTwoStrings,
3-
findBestMatch
2+
compareTwoStrings:compareTwoStrings,
3+
findBestMatch:findBestMatch
44
};
55

66
function compareTwoStrings(first, second) {
@@ -57,13 +57,13 @@ function findBestMatch(mainString, targetStrings) {
5757

5858
const bestMatch = ratings[bestMatchIndex]
5959

60-
return { ratings, bestMatch, bestMatchIndex };
60+
return { ratings: ratings, bestMatch: bestMatch, bestMatchIndex: bestMatchIndex };
6161
}
6262

6363
function areArgsValid(mainString, targetStrings) {
6464
if (typeof mainString !== 'string') return false;
6565
if (!Array.isArray(targetStrings)) return false;
6666
if (!targetStrings.length) return false;
67-
if (targetStrings.find(s => typeof s !== 'string')) return false;
67+
if (targetStrings.find( function (s) { return typeof s !== 'string'})) return false;
6868
return true;
6969
}

0 commit comments

Comments
 (0)