HTML5 Zone is brought to you in partnership with:

Hirvesh Munogee is a freelance web developer who also happens to have a passion for blogging. Hirvesh is a DZone MVB and is not an employee of DZone and has posted 175 posts at DZone. You can read more from them at their website. View Full User Profile

Fuse.js - A Lightweight Fuzzy-Search JavaScript Library

01.14.2013
| 3490 views |
  • submit to reddit

Fuse.js is a lightweight JavaScript library which allows you to create a search box on the client-side to search moderately large data sets in a fuzzy fashion.  It allows you to search through a list of data by providing a pattern (with a maximum length of 32 characters) which can include misspellings as well.

The results are sorted by score using a full Bitap algorithm, leveraging a modified version of the Diff, Match & Patch tool by Google. Performance was the main criteria when developing the library.  The search can search for two keys in 20K records in approximately 1 second.


Browser Support

  • Chrome
  • Safari 4+
  • Firefox 3.5+
  • IE 6,7,8,9+
  • Opera 10.6+
  • Mobile Safari (iOS 4+)

Requirements: None
Demo:http:/ / kiro. me/ projects/ fuse. html
License: Apache License v2.0

Published at DZone with permission of Hirvesh Munogee, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)