0.1.0 • Published 6 months ago
@savant-realms/fizzmatch v0.1.0
FizzMatch
FizzMatch: A TypeScript package for fuzzy string search, implemented from scratch.
Overview
FizzMatch is a lightweight TypeScript module for fuzzy string search, implemented from scratch using Levenshtein distance. Perfect for auto-complete, typo-tolerant lookup, and search-as-you-type features.
Installation
npm install fizzmatchUsage
import { search, topMatch } from "fizzmatch";
const items = ["apple", "banana", "orange"];
console.log(search("appl", items)); // [ { item: 'apple', distance: 1 }, … ]
console.log(topMatch("banan", items)); // { item: 'banana', distance: 1 }Building Locally
npm install
npm run build0.1.0
6 months ago