@lvce-editor/fuzzy-search
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@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.

Readme

Keywords

Package Sidebar

Install

npm i @lvce-editor/fuzzy-search

Weekly Downloads

153

Version

1.0.0

License

MIT

Unpacked Size

6.99 kB

Total Files

5

Last publish

Collaborators

  • levivilet