docs/index.md
Lightweight fuzzy-search library, with zero dependencies.
<UsedBy />import Fuse from 'fuse.js'
const books = [
{ title: "Old Man's War", author: 'John Scalzi' },
{ title: 'The Lock Artist', author: 'Steve Hamilton' },
{ title: 'JavaScript Patterns', author: 'Stoyan Stefanov' }
]
const fuse = new Fuse(books, {
keys: ['title', 'author'],
includeScore: true
})
fuse.search('jon')
// [{ item: { title: "Old Man's War", author: "John Scalzi" }, refIndex: 0, score: 0.25 }]
fuse.search('patterns')
// [{ item: { title: "JavaScript Patterns", ... }, refIndex: 2, score: 0.0 }]
::: warning Fuse Cloud — Coming Soon Need Fuse.js search without the client-side overhead? Fuse Cloud is a hosted search API — upload JSON, get an endpoint. Same fuzzy search, zero infrastructure. Learn more → :::
$and / $or expressions for structured queriestitle over descriptiongetFnnpm install fuse.js
See Getting Started for installation options, builds, and imports.
::: tip Building for Apple platforms? fuse-swift is the official Swift port for iOS, macOS, tvOS, watchOS, visionOS, and Linux. Byte-equivalent results, idiomatic Swift API. Currently in release candidate. :::
<!-- <CommercialCTA /> --> <!-- <Sponsor /> -->