Socket
Socket
Sign inDemoInstall

levenshtein-edit-distance

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

levenshtein-edit-distance - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

cli.js

33

package.json
{
"name": "levenshtein-edit-distance",
"version": "0.1.2",
"version": "0.1.3",
"description": "Levenshtein edit distance. No cruft. Real fast.",

@@ -10,3 +10,5 @@ "license": "MIT",

"edit",
"distance"
"distance",
"bin",
"cli"
],

@@ -18,7 +20,11 @@ "repository": {

"author": "Titus Wormer <tituswormer@gmail.com>",
"bin": {
"levenshtein-edit-distance": "cli.js"
},
"devDependencies": {
"eslint": "^0.9.0",
"eslint": "^0.10.0",
"istanbul": "^0.3.0",
"jscs": "^1.7.0",
"matcha": "^0.5.0",
"jscs": "^1.0.0",
"jscs-jsdoc": "^0.3.0",
"matcha": "^0.6.0",
"mocha": "^2.0.0"

@@ -28,13 +34,16 @@ },

"test": "node_modules/.bin/_mocha --reporter spec --check-leaks -u exports test.js",
"test-travis": "node_modules/.bin/istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --check-leaks -u exports test.js",
"lint": "npm run lint-api && npm run lint-test && npm run lint-style && npm run lint-benchmark",
"test-cli": "bash ./test.sh",
"test-coveralls": "node_modules/.bin/istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --check-leaks -u exports test.js",
"test-travis": "npm run test-cli && npm run test-coveralls",
"coverage": "node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- -- test.js",
"lint-api": "node_modules/.bin/eslint index.js --rule 'no-cond-assign: false, strict: false'",
"lint-benchmark": "node_modules/.bin/eslint benchmark.js --global suite,set,bench",
"lint-cli": "node_modules/.bin/eslint cli.js --rule 'no-process-exit: false'",
"lint-test": "node_modules/.bin/eslint test.js --env mocha",
"lint-benchmark": "node_modules/.bin/eslint benchmark.js --global suite,set,bench",
"lint-style": "node_modules/.bin/jscs test.js benchmark.js --reporter=inline",
"coverage": "node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- -- test.js",
"lint-style": "node_modules/.bin/jscs benchmark.js cli.js test.js --reporter=inline",
"lint": "npm run lint-api && npm run lint-benchmark && npm run lint-cli && npm run lint-test && npm run lint-style",
"make": "npm run lint && npm run coverage",
"install-benchmark": "npm install natural fast-levenshtein levenshtein levenshtein-component levenshtein-deltas leven",
"benchmark": "node_modules/.bin/matcha benchmark.js",
"make": "npm run lint && npm run coverage"
"benchmark": "node_modules/.bin/matcha benchmark.js"
}
}

@@ -8,3 +8,3 @@ # levenshtein-edit-distance [![Build Status](https://img.shields.io/travis/wooorm/levenshtein-edit-distance.svg?style=flat)](https://travis-ci.org/wooorm/levenshtein-edit-distance) [![Coverage Status](https://img.shields.io/coveralls/wooorm/levenshtein-edit-distance.svg?style=flat)](https://coveralls.io/r/wooorm/levenshtein-edit-distance?branch=master)

npm:
```sh
```bash
$ npm install levenshtein-edit-distance

@@ -14,3 +14,3 @@ ```

Component:
```sh
```bash
$ component install wooorm/levenshtein-edit-distance

@@ -20,3 +20,3 @@ ```

Bower:
```sh
```bash
$ bower install levenshtein-edit-distance

@@ -42,2 +42,30 @@ ```

## CLI
Install:
```bash
$ npm install --global levenshtein-edit-distance
```
Use:
```
Usage: levenshtein-edit-distance [options] words...
Levenshtein edit distance. No cruft. Real fast.
Options:
-h, --help output usage information
-v, --version output version number
Usage:
# output distance between values
$ levenshtein-edit-distance sitting kitten
# 3
# output distance between values from stdin
$ echo "saturday,sunday" | levenshtein-edit-distance
# 3
```
## Other Levenshtein libraries

@@ -54,31 +82,25 @@

On a MacBook Air, it runs about 1,915,000 op/s.
On a MacBook Air, it runs about 1,909,000 op/s.
Run the benchmark yourself:
```sh
$ npm run benchmark
```
Levenshtein — to be fair, it lets you inspect a matrix
113 op/s » op/s * 1,000
```
Levenshtein — to be fair, it lets you inspect a matrix
129 op/s » op/s * 1,000
natural — to be fair, it offers more options
183 op/s » op/s * 1,000
natural — to be fair, it offers more options
212 op/s » op/s * 1,000
levenshtein-deltas
237 op/s » op/s * 1,000
levenshtein-deltas
252 op/s » op/s * 1,000
levenshtein-component
305 op/s » op/s * 1,000
levenshtein-component
335 op/s » op/s * 1,000
fast-levenshtein
1,141 op/s » op/s * 1,000
fast-levenshtein
1,251 op/s » op/s * 1,000
Leven — fast.
2,076 op/s » op/s * 1,000
Leven — fast.
1,541 op/s » op/s * 1,000
levenshtein-edit-distance — this module
1,915 op/s » op/s * 1,000
levenshtein-edit-distance — this module
1,909 op/s » op/s * 1,000
```

@@ -88,2 +110,2 @@

MIT © Titus Wormer
MIT © [Titus Wormer](http://wooorm.com)
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