Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

listenshtein

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

listenshtein

Filter a list based on Levenshtein distances

latest
Source
npmnpm
Version
0.0.0
Version published
Maintainers
1
Created
Source

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

Keywords

levenshtein

FAQs

Package last updated on 24 Jul 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts