0.0.0 • Published 11 years ago

listenshtein v0.0.0

Weekly downloads
4
License
-
Repository
github
Last release
11 years ago

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