FZF for JavaScript is a library that ports the core fuzzy-finding algorithm from the popular FZF CLI tool into a JavaScript-native implementation, making it suitable for both browser and Node.js environments. The current stable version is `v0.5.2`. The project exhibits an active development cadence, with frequent minor releases that, while in `0.x` territory, introduce significant features and occasionally breaking changes. It differentiates itself by offering two distinct fuzzy algorithms (`v1` for speed, `v2` for better highlighting), support for extended search syntax, and an asynchronous finder for maintaining a responsive user interface during complex queries. This library is specifically designed to power command palettes and similar interactive search UIs in modern web applications, providing a robust and performant fuzzy matching experience.
npm install fzfVerified import paths — ran on the pinned version, not inferred.
This quickstart initializes `Fzf` with a list of strings and performs a basic fuzzy search, demonstrating how to retrieve and iterate over the sorted results.
Review the new `tiebreakers` behavior in the official documentation and update your `FzfOptions` accordingly to achieve the desired sorting.
Always use `v0.5.1` or above. If you accidentally installed `0.5.0`, downgrade or upgrade to a stable version immediately (e.g., `npm install fzf@latest`).
Always pin to exact versions or use carets (`^`) with caution. Thoroughly test updates before deploying to production and review migration guides provided by the library.
Upgrade to `fzf@0.5.2` or later. If upgrading is not possible, ensure your `tsconfig.json` uses a compatible `moduleResolution` setting (e.g., `node`).
If performance is critical, instantiate `Fzf` with `{ algorithm: 'v1' }` in its options to potentially gain speed at the expense of highlighting quality. Benchmark both options for your specific use case.Ensure `fzf` is installed (`npm i fzf`) and upgrade to `fzf@0.5.2` or later. If upgrading is not feasible, adjust `compilerOptions.moduleResolution` in `tsconfig.json` to `node`.
Use ESM `import { Fzf } from 'fzf'` instead of `const { Fzf } = require('fzf')`. Ensure your project is configured for ESM (e.g., `"type": "module"` in `package.json`).This specific version is known to be problematic. Upgrade to `fzf@0.5.1` or the latest stable version. Avoid using `fzf@0.5.0` entirely.
No dependency data recorded yet.