New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

levenshtein-search

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-search - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

4

levenshtein-search.js

@@ -32,3 +32,3 @@ const { searchExact, reverse } = require('./utils')

const [ dist, length ] = _expand(a, b, maxDist)
const [dist, length] = _expand(a, b, maxDist)
return dist + (b.length - length) <= maxDist

@@ -224,3 +224,3 @@ }

)),
maxDist
maxDist - distRight
)

@@ -227,0 +227,0 @@ if (distLeft === null) continue

@@ -6,3 +6,7 @@ {

"keywords": [
"Levenshtein Distance", "edit distance", "Levenshtein", "fuzzy", "search"
"Levenshtein Distance",
"edit distance",
"Levenshtein",
"fuzzy",
"search"
],

@@ -12,5 +16,5 @@ "main": "index.js",

"devDependencies": {
"jest": "^23.6.0",
"lodash": "^4.17.11",
"standard": "^12.0.1"
"jest": "^26.0.1",
"lodash": "^4.17.15",
"standard": "^14.3.4"
},

@@ -27,7 +31,7 @@ "repository": {

"scripts": {
"check-only": "grep -c \"test.only\" test.js | python -c \"import sys; sys.exit(0 if int(sys.stdin.read()) == 0 else 1)\"",
"check-only": "! grep 'test.only' tests/test.js -n",
"lint": "standard",
"test": "npm run lint && npm run check-only && jest"
},
"version": "0.1.0"
"version": "0.1.1"
}

@@ -0,0 +0,0 @@ # levenshtein-search

@@ -25,9 +25,9 @@ /* global describe, expect, test */

// name: (needle, haystack, [index, ...]),
'identical': ['abc', 'abc', [0]],
'substring': ['abc', '-ab-abc-ab-', [4]],
identical: ['abc', 'abc', [0]],
substring: ['abc', '-ab-abc-ab-', [4]],
'double first item': ['def', 'abcddefg', [4]],
'missing second item': ['bde', 'abcdefg', []],
'completely different': ['abc', 'def', []],
'startswith': ['abc', 'abcd', [0]],
'endswith': ['bcd', 'abcd', [1]],
startswith: ['abc', 'abcd', [0]],
endswith: ['bcd', 'abcd', [1]],
'multiple matches': ['abc', '-abc-abc-abc-', [1, 5, 9]]

@@ -118,3 +118,3 @@ }

]],
'substring': ['PATTERN', '----------PATTERN---------', [
substring: ['PATTERN', '----------PATTERN---------', [
[0, [[10, 17, 0]]],

@@ -121,0 +121,0 @@ [1, [[10, 17, 0]]],

Sorry, the diff of this file is not supported yet

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