fzf
Do fuzzy matching using FZF algorithm in JavaScript
Last updated 3 years ago by ajitid .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install fzf 
SYNC missed versions from official npm registry.

FZF for JavaScript

Tests Docs deployment status

Docs · Demo · GitHub · NPM

Originally available as a fuzzy finder for CLIs, FZF for JavaScript is a port of FZF's main algorithm so it can be used in browser context.

Quick look

Install FZF for JavaScript using:

npm i fzf

Then you can use it like:

import { Fzf } from 'fzf'

const list = ['go', 'javascript', 'python', 'rust', 
              'swift', 'kotlin', 'elixir', 'java', 
              'lisp', 'v', 'zig', 'nim', 'rescript', 
              'd', 'haskell']

const fzf = new Fzf(list)
const entries = fzf.find('li')
console.log('ranking is:')
entries.forEach(entry => console.log(entry.item)) // lisp kotlin elixir

For more ways to use this library, visit documentation.

Motivation

Command palette is becoming ubiquitous – you can find it in code editors (Sublime Text, VS Code), design tools (Figma), project management apps (Height, Linear), source control tools (Fork, Sublime Merge). Web apps are becoming more prevalent as well. FZF has a great fuzzy finding mechanism which could be used outside of CLI and into these palettes.

There is a very good read about command palettes if you want to learn more.

Thanks

Current Tags

  • 0.5.2                                ...           latest (3 years ago)
  • 0.4.0-alpha.0                                ...           unstable (5 years ago)

7 Versions

  • 0.5.2                                ...           3 years ago
  • 0.5.1                                ...           4 years ago
  • 0.4.1                                ...           5 years ago
  • 0.4.0-alpha.0                                ...           5 years ago
  • 0.3.2                                ...           5 years ago
  • 0.3.1                                ...           5 years ago
  • 0.0.1                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 6
Last Month 5
Dependencies (0)
None
Dev Dependencies (30)

Copyright 2013 - present © cnpmjs.org | Home |