tad-lispy / node-damerau-levenshtein

Damerau - Levenstein distance function for node
BSD 2-Clause "Simplified" License
46 stars 10 forks source link

Fails in strict mode #7

Closed gilly3 closed 7 years ago

gilly3 commented 7 years ago

If I run node in strict mode, this package throws an error:

// testleven.js
const leven = require("damerau-levenshtein");
console.log(leven("app", "apple"));
$ node --use_strict testleven.js
ReferenceError: j is not defined
    at module.exports (./node_modules/damerau-levenshtein/index.js:38:12)
    at repl:1:1
    at sigintHandlersWrap (vm.js:22:35)
    at sigintHandlersWrap (vm.js:96:12)
    at ContextifyScript.Script.runInThisContext (vm.js:21:12)
    at REPLServer.defaultEval (repl.js:313:29)
    at bound (domain.js:280:14)
    at REPLServer.runBound [as eval] (domain.js:293:12)
    at REPLServer.<anonymous> (repl.js:513:10)
    at emitOne (events.js:101:20)
tad-lispy commented 7 years ago

You are right. Thank you. The release is on the way (I just need to update the test command and the change log).