gf3/Levenshtein — Issue #1: Zero length string throws an exception
Author: celer
Created: 2012-01-29 02:23:12+00:00
State: open

var l = require('levenshtein');
new l('a','').distance;
TypeError: Cannot read property 'length' of undefined
at new Levenshtein (/home/celer/Project/pounced/node_modules/levenshtein/lib/levenshtein.js:68:44)
at repl:1:5
at REPLServer.eval (repl.js:80:21)
at repl.js:190:20
at REPLServer.eval (repl.js:87:5)
at Interface. (repl.js:182:12)
at Interface.emit (events.js:67:17)
at Interface._onLine (readline.js:162:10)
at Interface._line (readline.js:426:8)
at Interface._ttyWrite (readline.js:603:14)