1.0.0 • Published 9 months ago

@lvce-editor/fuzzy-search v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

@lvce-editor/fuzzy-search

Fuzzy search implementation based on VSCode's implementation of the Needleman–Wunsch algorithm.

Install

npm install @lvce-editor/fuzzy-search

Usage

import * as FuzzySearch from '@lvce-editor/fuzzy-search'

const pattern = 'fd'
const word = 'font-display'

const result = FuzzySearch.fuzzySearch(pattern, word) // [0, 1, 5, 6] highlight chars 0-1 (f) and 5-6 (d)

Gitpod

Open in Gitpod

Credits

This project is based on VSCode's implementation of the Needleman–Wunsch algorithm.

1.0.0

9 months ago