Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
fuzzysort.go(search, targets, {
threshold: -Infinity, // Don't return matches worse than this (higher is faster)
limit: Infinity, // Don't return more results than this (lower is faster)
all: false, // If true, returns all results for an empty search
key: null, // For when targets are objects (see its example usage)
keys: null, // For when targets are objects (see its example usage)
scoreFn: null, // For use with `keys` (see its example usage)
});
What is a result
const result = fuzzysort.single("query", "some string that contains my query.");
// exact match returns a score of 0. lower is worse
result.score; // -59
result.target; // some string that contains my query.
result.obj; // reference to your original obj when using options.key
fuzzysort.highlight(result, "<b>", "</b>"); // some string that contains my <b>query</b>.
How To Go Fast · Performance Tips
let targets = [{ file: "Monitor.cpp" }, { file: "MeshRenderer.cpp" }];
// filter out targets that you don't need to search! especially long ones!
targets = targets.filter((t) => t.file.length < 1000);
// if your targets don't change often, provide prepared targets instead of raw strings!
targets.forEach((t) => (t.filePrepared = fuzzysort.prepare(t.file)));
// don't use options.key if you don't need a reference to your original obj
targets = targets.map((t) => t.filePrepared);
const options = {
limit: 100, // don't return more results than you need!
threshold: -10000, // don't return bad results
};
fuzzysort.go("gotta", targets, options);
fuzzysort.go("go", targets, options);
fuzzysort.go("fast", targets, options);
Advanced Usage
Search a list of objects, by multiple fields, with custom weights.
let objects = [
{ title: "Favorite Color", desc: "Chrome" },
{ title: "Google Chrome", desc: "Launch Chrome" },
];
let results = fuzzysort.go("chr", objects, {
keys: ["title", "desc"],
// Create a custom combined score to sort by. -100 to the desc score makes it a worse match
scoreFn: (a) =>
Math.max(a[0] ? a[0].score : -1000, a[1] ? a[1].score - 100 : -1000),
});
var bestResult = results[0];
// When using multiple `keys`, results are different. They're indexable to get each normal result
fuzzysort.highlight(bestResult[0]); // 'Google <b>Chr</b>ome'
fuzzysort.highlight(bestResult[1]); // 'Launch <b>Chr</b>ome'
bestResult.obj.title; // 'Google Chrome'
Changelog
v2.0.0
Added new behavior when your search contains spaces!
No homepage URL was recorded for slab/fuzzysort in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
Does slab/fuzzysort have any tags?
TopGit's last sync did not record any GitHub topics for slab/fuzzysort. GitHub topics appear in the right sidebar of a repository page; that's the authoritative place to check.
How many stars does slab/fuzzysort have?
slab/fuzzysort has 1 GitHub stars — refresh the page for the live number, or check github.com/slab/fuzzysort. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is slab/fuzzysort open source?
TopGit's metadata for slab/fuzzysort does not record a license. Most public repositories on GitHub ARE open source, but the exact terms vary — verify by opening the LICENSE file directly.
Is slab/fuzzysort still maintained?
TopGit's metadata for slab/fuzzysort does not include a recent push date. Check the commit history on the GitHub repository page for the most authoritative activity timeline.
Where do I read more about slab/fuzzysort?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/slab/fuzzysort is the definitive source.
Read full README in the tab above.
Curious whether fuzzysort is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about fuzzysort.