0.1.0 • Published 6 months ago

@savant-realms/fizzmatch v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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 fizzmatch

Usage

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 build
0.1.0

6 months ago