finds.dev

bevacqua/fuzzysearch

Tiny and blazing-fast fuzzy search in JavaScript

View on GitHubHomepage ↗

★ 2,744JavaScriptMITupdated May 2023

// the take

A single-function JavaScript library that checks whether one string is a subsequence of another — every character in the needle appears in the haystack in order, but not necessarily contiguously. It is not fuzzy search in the Levenshtein sense; it is subsequence matching. Good for autocomplete filters where you want 'twl' to match 'cartwheel'.

The implementation is genuinely tiny — the entire thing is one loop in index.js, no dependencies, no build step. Subsequence matching is fast in practice for autocomplete because you bail early on mismatch. The README is honest about what the algorithm is and is not, which is more than most micro-libraries manage. MIT licensed, works in any JS environment.

Last meaningful commit is from 2015; the 2023 touch was likely a metadata bump. No ranking or scoring — you get a boolean, so filtering a list of 500 options gives you no way to sort 'cart' above 'cw' as a match for 'cartwheel'. The algorithm has no tolerance for transpositions or typos, so a mistyped character gives zero match where a user expects partial credit. At this point there are maintained alternatives (fuse.js, uFuzzy) that do ranking and have kept up with the ecosystem.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
2,744
Forks
84
Language
JavaScript
License
MIT
Last commit
31 May 2023

// nearby

If fuzzysearch isn't quite it.

All repos →