Gathering detailed insights and metrics for @doubletrade/fastest-levenshtein
Gathering detailed insights and metrics for @doubletrade/fastest-levenshtein
Gathering detailed insights and metrics for @doubletrade/fastest-levenshtein
Gathering detailed insights and metrics for @doubletrade/fastest-levenshtein
npm install @doubletrade/fastest-levenshtein
Typescript
Module System
Min. Node Version
Node Version
NPM Version
71.4
Supply Chain
85
Quality
79.3
Maintenance
100
Vulnerability
100
License
TypeScript (100%)
Total Downloads
647
Last Day
1
Last Week
3
Last Month
9
Last Year
124
675 Stars
134 Commits
22 Forks
6 Watching
1 Branches
8 Contributors
Minified
Minified + Gzipped
Latest Version
1.0.14
Package Id
@doubletrade/fastest-levenshtein@1.0.14
Unpacked Size
16.42 kB
Size
5.16 kB
File Count
13
NPM Version
8.12.1
Node Version
18.4.0
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
0%
3
Compared to previous week
Last month
-25%
9
Compared to previous month
Last year
-29.9%
124
Compared to previous year
21
Fastest JS/TS implemenation of Levenshtein distance.
Measure the difference between two strings.
1$ npm i fastest-levenshtein
1const {distance, closest} = require('fastest-levenshtein') 2 3// Print levenshtein-distance between 'fast' and 'faster' 4console.log(distance('fast', 'faster')) 5//=> 2 6 7// Print string from array with lowest edit-distance to 'fast' 8console.log(closest('fast', ['slow', 'faster', 'fastest'])) 9//=> 'faster'
1import {distance, closest} from 'https://deno.land/x/fastest_levenshtein/mod.ts' 2 3// Print levenshtein-distance between 'fast' and 'faster' 4console.log(distance('fast', 'faster')) 5//=> 2 6 7// Print string from array with lowest edit-distance to 'fast' 8console.log(closest('fast', ['slow', 'faster', 'fastest'])) 9//=> 'faster'
I generated 500 pairs of strings with length N. I measured the ops/sec each library achieves to process all the given pairs. Higher is better.
Test Target | N=4 | N=8 | N=16 | N=32 | N=64 | N=128 | N=256 | N=512 | N=1024 |
---|---|---|---|---|---|---|---|---|---|
fastest-levenshtein | 44423 | 23702 | 10764 | 4595 | 1049 | 291.5 | 86.64 | 22.24 | 5.473 |
js-levenshtein | 21261 | 10030 | 2939 | 824 | 223 | 57.62 | 14.77 | 3.717 | 0.934 |
leven | 19688 | 6884 | 1606 | 436 | 117 | 30.34 | 7.604 | 1.929 | 0.478 |
fast-levenshtein | 18577 | 6112 | 1265 | 345 | 89.41 | 22.70 | 5.676 | 1.428 | 0.348 |
levenshtein-edit-distance | 22968 | 7445 | 1493 | 409 | 109 | 28.07 | 7.095 | 1.789 | 0.445 |
This image shows the relative performance between fastest-levenshtein
and js-levenshtein
(the 2nd fastest). fastest-levenshtein
is always a lot faster. y-axis shows "times faster".
This project is licensed under the MIT License - see the LICENSE.md file for details
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 6/23 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More