Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fuzzy

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fuzzy

small, standalone fuzzy search / fuzzy filter. browser or node

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.1M
decreased by-8.57%
Maintainers
1
Weekly downloads
 
Created

What is fuzzy?

The fuzzy npm package is used for implementing fuzzy searching. This means it can match partial strings to a list of strings and return the best matches. It is useful for features like autocomplete or filtering a list based on user input.

What are fuzzy's main functionalities?

Simple fuzzy matching

This feature allows you to perform a simple fuzzy search on an array of strings. It will return an array of matches with their original strings and score of the match.

const fuzzy = require('fuzzy');
const results = fuzzy.filter('twl', ['apple', 'banana', 'kiwi', 'tower']);
console.log(results.map(el => el.string));

Customizing the search

This feature allows you to customize the search with options such as pre and post to highlight the matched substring and extract to specify which property of the objects to search against.

const fuzzy = require('fuzzy');
const options = { pre: '<', post: '>', extract: el => el.title };
const results = fuzzy.filter('twl', [{title: 'apple'}, {title: 'banana'}, {title: 'tower'}], options);
console.log(results.map(el => el.string));

Other packages similar to fuzzy

Keywords

FAQs

Package last updated on 01 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc