# Installation

Latest stable version: 6.6.2

# NPM

$ npm install --save fuse.js

# Yarn

$ yarn add fuse.js

# Importing

ES6 module syntax:

import Fuse from 'fuse.js'

CommonJS:

const Fuse = require('fuse.js')

# Direct <script> Include

Simply download and include with a script tag. Fuse will be registered as a global variable.

# CDN

For prototyping or learning purposes, you can use the latest version with:

<script src="https://cdn.jsdelivr.net/npm/fuse.js/dist/fuse.js"></script>

For production, we recommend linking to a specific version number and build to avoid unexpected breakage from newer versions:

<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.6.2"></script>

If you are using native ES Modules, there is also an ES Modules compatible build:

<script type="module">
  import Fuse from 'https://cdn.jsdelivr.net/npm/fuse.js@6.6.2/dist/fuse.esm.js'
</script>

You can browse the source of the NPM package at cdn.jsdelivr.net/npm/fuse.js (opens new window).

Fuse.js is also available on unpkg (opens new window).

Make sure to read about the different builds of Fuse.js and use the production version in your published site, replacing fuse.js with fuse.min.js. This is a smaller build optimized for speed instead of development experience.

# Deno

You can directly import Fuse as an ES module from the deno.land/x service:

// @deno-types="https://deno.land/x/fuse@v6.6.2/dist/fuse.d.ts"
import Fuse from 'https://deno.land/x/fuse@v6.6.2/dist/fuse.esm.min.js'
Last Updated: 5/10/2022, 7:02:29 PM