cdn

Fuse.js

Released Installed

Lightweight fuzzy-search library for the browser.

How to include

<script type="module">
  import Fuse from 'https://cdn.roste.org/fuse.js/latest/fuse.min.mjs';
  const fuse = new Fuse(list, { keys: ['title'] });
</script>

v7+ ships ESM only (fuse.min.mjs). Pick 6.6.2 for a classic UMD fuse.min.js global.

Download zip


Search books

    <script type="module">
      import Fuse from "latest/fuse.min.mjs";
      const fuse = new Fuse(books, { keys: ["title", "author"], threshold: 0.4 });
      console.log(fuse.search("old man"));
    </script>