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

levenshtein

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

levenshtein

Javascript implementation of the L-diggity.

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Levenshtein

Levenshtein string difference in Javascript.

Screenshot

Levenshtein also does some neat things like coerce to a number and string approproately. So you can compare Levenshtein objects directly! Not to mention it has specs!

API

  • new Levenshtein( m, n )Levenshtein

    • m ( String ): First string.
    • n ( String ): Second string.
    • Initialise a new Levenshtein object.
  • Levenshtein#distanceNumber

    • Distance between strings.
  • Levenshtein#inspect()String

    • Pretty print Levenshtein table.
  • Levenshtein#toString()String

    • Alias of: Levenshtein#inspect().
  • Levenshtein#valueOf()Number

    • Alias of: Levenshtein#distance.

Installation

Levenshtein works in both the browser and node.js.

Browser

Simply include levenshtein.js:

<script src="/javascripts/levenshtein.js"></script>

NPM

Install via npm:

npm install levenshtein

Or put it in your package.json:

{ "levenshtein": "~1.0" }

Bower

bower install levenshtein

Git

git clone git://github.com/gf3/Levenshtein.git

License

Levenshtein is UNLICENSED.

Author

Written by Gianni Chiappettagf3.ca

FAQs

Package last updated on 23 Sep 2014

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