fuzzy-ranking

Installation
SKILL.md

Setup

import { compareItems, rankItem, rankings } from '@tanstack/match-sorter-utils'

const query = 'tan'
const values = ['table', 'tanner', 'router']
export const ranked = values
  .map((value) => ({
    value,
    info: rankItem(value, query, { threshold: rankings.MATCHES }),
  }))
  .filter((entry) => entry.info.passed)
  .sort((a, b) => compareItems(a.info, b.info))

Core Patterns

Installs
7
Repository
tanstack/table
GitHub Stars
28.4K
First Seen
Aug 4, 2026
fuzzy-ranking — tanstack/table