sublime-like-fuzzy

3.0.0 • Public • Published

A packaged, syncronous form of Forrest Smith's reverse engineered Sublime Text fuzzy search.

This variant excludes use of performance and inline async flow. Use workers for large data sets.

Usage

const fuzz = require('sublime-like-fuzzy');

for (const [score, match, formattedMatch] of fuzz(needle, haystack)) {
	// score is the relative score of the match.
	// matches is sorted by score, descending.

	// match is the particular string in the haystack
	// matching the needle text.

	// formattedMatch is the match except the highest scoring
	// letter sequence are enclosed in <b> and </b>.
}

Readme

Keywords

none

Package Sidebar

Install

npm i sublime-like-fuzzy

Weekly Downloads

4

Version

3.0.0

License

SEE LICENSE IN LICENSE

Last publish

Collaborators

  • sage.gerard