From 0469abd4a9c9270a1fdc962969e36e63699af8b4 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sun, 10 Dec 2017 21:51:33 +0100 Subject: upgrade dependencies --- node_modules/yargs/lib/levenshtein.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'node_modules/yargs/lib/levenshtein.js') 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 } -- cgit v1.2.3