fuzzysort2
v0.1.1
Published
`fuzzysort2` is a TypeScript-first fuzzy search library for matching one query against one string, searching arrays of strings, and searching records through one or more named text fields.
Downloads
1,480
Readme
fuzzysort2
Purpose
fuzzysort2 is a TypeScript-first fuzzy search library for matching one query against one string, searching arrays of strings, and searching records through one or more named text fields.
Installation
pnpm add fuzzysort2Quick Example
import { search } from 'fuzzysort2'
const result = search('c man', [
'CheatManager.h',
'Manifest.cpp',
'CheatManager.cpp',
], { limit: 2 })
console.log(result.items.map(item => item.target))Documentation Map
- Concepts, API selection, invariants, and recommended patterns: docs/context.md
- Runnable usage examples: examples/basic-search.ts, examples/prepared-targets.ts, examples/field-search.ts, examples/highlighting.ts
- Exact exported signatures: generated
dist/index.d.mtsafterpnpm build - Factual API behavior: public TSDoc in src/index.ts
