A lightweight JavaScript library for fuzzy string searching and filtering, inspired by Sublime Text's command-p.
Fuzzy is a JavaScript library that implements fuzzy string searching and filtering, allowing users to find items in a list even when their search query contains typos, omissions, or is incomplete. It provides functions to filter arrays and match patterns with configurable options for highlighting matches. The library is inspired by Sublime Text's command-p fuzzy file search and works in both Node.js and browser environments.
JavaScript developers building applications with search functionality, such as autocomplete components, command palettes, or data filtering interfaces, who need a lightweight, dependency-free solution.
Developers choose Fuzzy for its minimal footprint (around 1KB), ease of integration, and reliable performance. It offers a straightforward API that handles complex matching scenarios without requiring additional dependencies, making it ideal for projects where bundle size and simplicity are priorities.
Filters a list based on a fuzzy string search
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
At only 1KB with no dependencies, it's trivial to add to any project without impacting load times, as emphasized in the README's standalone claim.
Works identically in Node.js and browsers with provided examples, ensuring seamless integration across platforms without extra configuration.
Allows wrapping matched characters with user-defined pre/post tags, enabling easy UI integration for search results, as shown in the Jedi example.
Supports a custom extract function to search nested object properties, demonstrated in the Jedi Master example for flexible data handling.
The algorithm matches the first occurrence in a string rather than the best possible match, leading to suboptimal results, as admitted in the TODO list.
Lacks async processing or web worker support, so filtering large arrays can block the main thread, a known limitation highlighted in the TODO for huge sets.
With the last release in 2016 and several unfinished TODOs, the library may not receive updates for modern JavaScript features or bug fixes.