# kentcdodds/match-sorter

Simple, expected, and deterministic best-match sorting of an array in JavaScript

Repository: https://github.com/kentcdodds/match-sorter
Canonical: https://ross.abutalabs.com/products/match-sorter
Homepage: https://npm.im/match-sorter
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2026-05-13T00:14:17+00:00

## Health v2 (maintenance only)
Score: 80/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 82, release rhythm 67, longevity 100
- inputs: {"age_days": 3660, "days_push": 113, "days_rel": 140, "gap_med": 31.0, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4104, forks 143 (observed 2026-08-28T04:08:35.593814+00:00)

## What it is
A JavaScript/TypeScript library that filters and sorts arrays of items by best match against a query string, using a deterministic ranking algorithm (case-sensitive equals, starts-with, acronym, etc.). It is commonly used to power autocomplete and filter inputs.

## Use cases
- filter a list of items as the user types in a search input
- sort autocomplete suggestions by best match
- implement fuzzy search over an array of objects
- rank dropdown options intuitively in a combobox
- search a list of countries or names with acronym matching

## When to choose
- you need simple, deterministic, user-friendly filtering and ranking of in-memory lists
- you want a tiny utility for autocomplete or filter inputs
- you need sensible ranking like starts-with, word-starts-with, and acronym matching without tuning a fuzzy-search algorithm

## When to avoid
- you need full-text search over large datasets or an index (use a search engine like Lunr or Elasticsearch)
- you need typo-tolerant or similarity-scored fuzzy matching rather than rank-based matching
- your data lives on a server and should be filtered server-side

## Facets
- artifact type: library
- maturity: stable
- function: search-engine
- domain: web-development, frontend, developer-tools
- platform: browser, cross-platform
- tags: fuzzy-matching, autocomplete, filtering, ranking, typescript, sorting, nodejs

## Member repositories
- kentcdodds/match-sorter (main) score 80

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:35.593814+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:23:15.310346+00:00, confidence not recorded.
  - readme: https://github.com/kentcdodds/match-sorter (fetched 2026-08-28T04:08:35.593814+00:00, sha 413f9ccb384f)
  - registry_npm: https://registry.npmjs.org/match-sorter (fetched 2026-08-29T09:15:03.411694+00:00, sha d99c92acdc2e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
