Coder Social home page Coder Social logo

carlosrziegler / fzf-for-js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ajitid/fzf-for-js

1.0 0.0 0.0 1.28 MB

Do fuzzy matching using FZF algorithm in JavaScript

Home Page: https://fzf.netlify.app

License: BSD 3-Clause "New" or "Revised" License

JavaScript 8.20% TypeScript 91.16% CSS 0.18% HTML 0.47%

fzf-for-js's Introduction

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

fzf-for-js's People

Contributors

ajitid avatar dependabot[bot] avatar reinhrst avatar wise-introvert avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.