match-sorter
Simple, expected, and deterministic best-match array sorting and filtering for JavaScript.
Why consider match-sorter?
match-sorter is an open-source array filtering and fuzzy matching utility written in JavaScript and TypeScript by Kent C. Dodds. match-sorter ranks array items based on similarity rankings (exact, startsWith, wordStartsWith, contains, acronym), producing intuitive search completions.
Learn match-sorter by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide2 sections
Overview of match-sorter
match-sorter filters autocomplete dropdown items with ranked relevance matching.
Quickstart
npm install match-sorterimport { matchSorter } from 'match-sorter';const results = matchSorter(['Invoice', 'Inventory', 'Insurance'], 'inv');match-sorter is licensed under the permissive MIT License.
Related tools
More options with a similar category or technology profile.
diskus
Minimal, fast alternative to du -sh written in Rust using multi-threaded directory traversal.
peco
Simplistic interactive filtering tool for Unix pipelines, process lists, and file trees.
Dapr CLI
Command-line tool for managing Dapr distributed application runtime environments and sidecars.
Freeze
Generate beautiful image screenshots and SVGs of code snippets and terminal outputs.