Commit d008f6d
Kaden Malik
chore(jest-validate): replace leven with turbo-leven
turbo-leven is a drop-in replacement for leven with:
- Zero required dependencies (pure-JS fallback always works on all platforms)
- Optional Rust native module for 1.3-3.4x faster perf on medium+ strings
- Ships its own TypeScript types (no need for @types/leven)
- Better Unicode handling (counts by codepoint, not UTF-16 code units)
- Compatible API: turboLeven(a, b) same as leven(a, b)
Benchmarks (Apple M2, Node 25, medium strings 35-45 chars):
turbo-leven: 1.29 µs/iter
leven: 4.36 µs/iter (3.38x slower)
fastest-levenshtein: 1.68 µs/iter (1.30x slower)
The change is one import line and one package.json dep — no other code changes.1 parent 399b831 commit d008f6d
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments