You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Happens consistently when second arg is two characters or more longer than first arg. If the second char is one character longer, it returns NaN:
> var ld = require("levenshtein-damerau");
undefined
> ld("abc", "abc");
0
> ld("abcd", "abc");
1
> ld("abcde", "abc");
2
> ld("abc", "abcd");
NaN
> ld("abc", "abcde");
TypeError: Cannot read property '1' of undefined
at ld (./node_modules/levenshtein-damerau/skodld.js:67:59)
at repl:1:1
at REPLServer.defaultEval (repl.js:164:27)
at bound (domain.js:250:14)
at REPLServer.runBound [as eval] (domain.js:263:12)
at REPLServer.<anonymous> (repl.js:393:12)
at emitOne (events.js:82:20)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:210:10)
at REPLServer.Interface._line (readline.js:549:8)
>
I get the following error:
TypeError: Cannot read property '0' of undefined
The text was updated successfully, but these errors were encountered: