Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Higher score to filename matches #100

Open
viveksjain opened this issue Mar 31, 2022 · 0 comments
Open

Higher score to filename matches #100

viveksjain opened this issue Mar 31, 2022 · 0 comments

Comments

@viveksjain
Copy link

Thanks for this great library, it's really fast!

Summary

Prioritize (either by default or with some option) matches in the filename (i.e. not any of the folders/rest of path).

Additional context

Simple example:

> const zadeh = require('zadeh')
undefined
> zadeh.filter(['foo/bar/baz_qux.js', 'foo/bazqux/a.js'], 'bazqux')
Zadeh: deprecated function. Use 'StringArrayFilterer' instead
[ 'foo/bazqux/a.js', 'foo/bar/baz_qux.js' ]

In my usage, I would generally actually prefer the result for baz_qux.js because I remember and search mostly based on filename.

I do see useExtensionBonus option, couldn't find any clear documentation on what that actually means but it doesn't seem to make any difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant