Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

levenary

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

levenary

[![npm-version](https://img.shields.io/npm/v/levenary.svg)](https://www.npmjs.com/package/levenary) [![github-actions](https://github.com/tanhauhau/levenary/workflows/CI/badge.svg)](https://github.com/tanhauhau/levenary/actions)

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
611K
decreased by-34.36%
Maintainers
1
Weekly downloads
 
Created
Source

levenary

npm-version github-actions

Given a string, A and an array of strings XS, return the string X from XS whose Levenshtein distance from A is minimal.

Install

$ npm install levenary

Usage

import levenary from 'levenary';

levenary('cat', ['cow', 'dog', 'pig']);
//=> 'cow'

Why levenary?

  1. Based on leven, the fastest JS implementation of the Levenshtein distance algorithm
  2. Only 1 API. Simple and clean. If you want more, please use didyoumean2.
  3. Flow and TypeScript support.

Benchmark

$ npm run bench
  311,915 op/s » levenary
   74,030 op/s » didyoumean
  141,423 op/s » didyoumean2

Keywords

FAQs

Package last updated on 28 Jan 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc