listenshtein

0.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i listenshtein

Weekly Downloads

2

Version

0.0.0

License

BSD

Last publish

Collaborators

  • dstokes