Skip to content

Commit 788dbc2

Browse files
committed
remove empty lines
1 parent 5dac03a commit 788dbc2

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/close-matches.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,17 @@ import {makeNormalizer} from './matches'
33
const initializeDpTable = (rows, columns) => {
44
const dp = Array(rows + 1)
55
.fill()
6-
76
.map(() => Array(columns + 1).fill())
87

98
// fill rows
10-
119
for (let i = 0; i <= rows; i++) {
1210
dp[i][0] = i
1311
}
1412

1513
// fill columns
16-
1714
for (let i = 0; i <= columns; i++) {
1815
dp[0][i] = i
1916
}
20-
2117
return dp
2218
}
2319

@@ -32,9 +28,7 @@ export const calculateLevenshteinDistance = (text1, text2) => {
3228
dp[row][column] =
3329
Math.min(
3430
dp[row - 1][column - 1],
35-
3631
dp[row][column - 1],
37-
3832
dp[row - 1][column],
3933
) + 1
4034
}
@@ -47,11 +41,8 @@ const MAX_LEVENSHTEIN_DISTANCE = 4
4741

4842
export const getCloseMatchesByAttribute = (
4943
attribute,
50-
5144
container,
52-
5345
searchText,
54-
5546
{collapseWhitespace, trim, normalizer} = {},
5647
) => {
5748
const matchNormalizer = makeNormalizer({collapseWhitespace, trim, normalizer})
@@ -91,6 +82,5 @@ export const getCloseMatchesByAttribute = (
9182
}
9283
closestValues.push(normalizedText)
9384
}
94-
9585
return closestValues
9686
}

0 commit comments

Comments
 (0)