I came across an instance of this returning the incorrect distance, here is a full code snippet to reproduce:
var levenshtein = require('fast-levenshtein');
var a = 'A Microbial communities are very vital in the function of all ecosystems';
var b1 = 'Microbial communities are vital in the functioning of all ecosystems;';
var b2 = 't\nMicrobial communities are vital in the functioning of all ecosystems;';
var leven1 = levenshtein.get(a, b1);
console.log(leven1); // returns 11 correctly
var leven2 = levenshtein.get(a, b2);
console.log(leven2); // should return 12, but returns 11 which is incorrect
I came across an instance of this returning the incorrect distance, here is a full code snippet to reproduce: