3 ms·
this is 115 lines of TS, which is pretty lightweight, but some other impt table stakes might be missing that you should be aware of. see all the JS alternative
by swyx 2y ago
this is 115 lines of TS, which is pretty lightweight, but some other impt table stakes might be missing that you should be aware of.
see all the JS alternatives with their sizes and feature sets and perf: https://github.com/leeoniya/uFuzzy https://github.com/leeoniya/uFuzzy (scroll to bottom)
i went down this path a few yrs ago and ended up picking ufuzzy: https://swyxkit.netlify.app/ufuzzy-search https://swyxkit.netlify.app/ufuzzy-search
- leeoniya 2y agothanks, glad you like it. you might be interested in doing a follow-up/update to your post, to use the .search() api, which does more stuff out of the box, such as outOfOrder, quoted, and negatives Libsearch looks similar to uFuzzy (indexless regexp builder) but more simplistic. the other one i've seen that does this is sifter.js (predates uFuzzy, but i didnt discover it until researching libs to compare afterwards)
- swyx 2y agoyour readme is the gold star in readmes, i hope you keep doing more oss work!