brianreavis / sifter.js

A library for textually searching arrays and hashes of objects by property (or multiple properties). Designed specifically for autocomplete.
1.09k stars 125 forks source link

When I need to find just firsts letters of each word #35

Closed Grigory-Volkov closed 6 years ago

Grigory-Volkov commented 8 years ago

Hello! It will be good upgrade, if you accept this)

Вecause you can do following: .search('be', {fields: ['title'], firsts: true}) And get result: "Beline", "Cool besness" Not this one: "Izbergamo"

Thanks :)

Grigory-Volkov commented 8 years ago

@brianreavis ?

holic commented 8 years ago

Can you add matching tests?

Wardrop commented 6 years ago

Came here to suggest the same thing. I've submitted a pull request for a more robust implementation based on word boundaries, rather than whitespace. Includes tests and documentation.

https://github.com/brianreavis/sifter.js/pull/51

holic commented 6 years ago

Closing in favor of https://github.com/brianreavis/sifter.js/pull/51