listenshtein

Filter a list based on Levenshtein distances

npm install listenshtein
1 downloads in the last week
7 downloads in the last month

listenshtein

Filter a list based on Levenshtein distances

Build Status
NPM

Example

var fs = require('fs')
  , listenshtein = require('listenshtein');

fs.readFile(somefile, function(err, data) {
  var words = data.split(' ');

  console.log(
    listenshtein('tako', words, 1);
  ); // => 'taco'
});

listenshtein(word, words, [max dist])

  • max dist the maximum levenshtein distance to allow (defaults to word.length - 1)

install

With npm do:

npm install listenshtein
npm loves you