Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lvce-editor/fuzzy-search
Fuzzy Search
https://github.com/lvce-editor/fuzzy-search
Last synced: 3 days ago
JSON representation
Fuzzy Search
- Host: GitHub
- URL: https://github.com/lvce-editor/fuzzy-search
- Owner: lvce-editor
- License: mit
- Created: 2024-10-13T18:35:24.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-10-27T18:06:56.000Z (19 days ago)
- Last Synced: 2024-10-27T21:48:02.901Z (19 days ago)
- Language: TypeScript
- Size: 99.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @lvce-editor/fuzzy-search
Fuzzy search implementation based on VSCode's implementation of the Needleman–Wunsch algorithm.
## Install
```sh
npm install @lvce-editor/fuzzy-search
```## Usage
```js
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](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/fuzzy-search)
## Credits
This project is based on VSCode's implementation of the Needleman–Wunsch algorithm.