aboutsummaryrefslogtreecommitdiff
path: root/node_modules/yargs/lib/levenshtein.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/yargs/lib/levenshtein.js')
-rw-r--r--node_modules/yargs/lib/levenshtein.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/node_modules/yargs/lib/levenshtein.js b/node_modules/yargs/lib/levenshtein.js
index 6ec216f59..f32b0c277 100644
--- a/node_modules/yargs/lib/levenshtein.js
+++ b/node_modules/yargs/lib/levenshtein.js
@@ -10,22 +10,22 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
// levenshtein distance algorithm, pulled from Andrei Mackenzie's MIT licensed.
// gist, which can be found here: https://gist.github.com/andrei-m/982927
-
+'use strict'
// Compute the edit distance between the two given strings
-module.exports = function (a, b) {
+module.exports = function levenshtein (a, b) {
if (a.length === 0) return b.length
if (b.length === 0) return a.length
- var matrix = []
+ const matrix = []
// increment along the first column of each row
- var i
+ let i
for (i = 0; i <= b.length; i++) {
matrix[i] = [i]
}
// increment each column in the first row
- var j
+ let j
for (j = 0; j <= a.length; j++) {
matrix[0][j] = j
}