https://github.com/lvce-editor/fuzzy-search
Fuzzy Search
https://github.com/lvce-editor/fuzzy-search
Last synced: 5 months 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 (9 months ago)
- Default Branch: main
- Last Pushed: 2024-11-26T19:51:25.000Z (8 months ago)
- Last Synced: 2025-01-11T01:51:58.371Z (6 months ago)
- Language: TypeScript
- Size: 87.9 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
[](https://gitpod.io/#https://github.com/lvce-editor/fuzzy-search)
## Credits
This project is based on VSCode's implementation of the Needleman–Wunsch algorithm.