krisk/Fuse là dự án Frontend trên GitHub, viết chủ yếu bằng JavaScript, với 20.5k sao. Lightweight fuzzy-search, in JavaScript
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Fuse.js is a lightweight, zero-dependency fuzzy-search library written in TypeScript. It works in the browser and on the server, and is designed for searching small-to-medium datasets on the client side where you can't rely on a dedicated search backend.
✨ What's New: Token Search
Multi-word fuzzy search with relevance ranking. Type "javascrpt paterns" and find "JavaScript Patterns" — typo tolerance, multiple words, and smart ranking all at once.
Search large datasets without freezing the UI. FuseWorker splits your data across multiple Web Workers and searches in parallel — ~5x faster on 100K documents.
Same options and results as Fuse — just async. Function-valued options (sortFn, getFn, keys[].getFn) aren't supported because functions can't be transferred to a worker; everything else carries over. See the Web Workers docs for the interactive demo and full API.
Use operators for precise control: exact match (=), prefix (^), suffix (!), and more. Enable with useExtendedSearch: true.
const fuse = new Fuse(list, {
useExtendedSearch: true,
keys: ['title']
})
fuse.search('=exact match') // exact match
fuse.search('^prefix') // starts with
fuse.search('!term') // does not include
Object Query Syntax
Prefer a structured, self-documenting alternative to the magic characters? Express the same operators as an object. Unlike the string form, this needs no useExtendedSearch flag (the operators are unambiguous), autocompletes in TypeScript, and needs no quoting or escaping.
Multiple operators on one field are AND-ed; use field-local $and / $or for more, and compose across fields with logical search:
// starts with "old" AND does not contain "draft"
fuse.search({ title: { $startsWith: 'old', $not: { $contains: 'draft' } } })
// title starts with "old" OR ends with "war"
fuse.search({ title: { $or: [{ $startsWith: 'old' }, { $endsWith: 'war' }] } })
Object queries return identical results to the equivalent string query, and validate strictly: unknown operators, empty or non-string values, and illegal nesting throw instead of silently degrading to a fuzzy search. Available in the full build. See the Extended Search docs for the full grammar.
Token Search
Splits multi-word queries into individual terms, fuzzy-matches each independently, and ranks results using BM25-style IDF weighting. Enable with useTokenSearch: true.
Typo tolerance per word — each term is fuzzy-matched independently
Relevance ranking — rare terms are weighted higher than common ones
Word order independent — "patterns javascript" and "javascript patterns" return identical results
No query length limit — long multi-word queries work naturally since each term is searched separately
AND or OR — tokenMatch: 'all' returns only records matching every word (filtering); the default 'any' matches any word
Custom tokenizer — pass a regex or function via tokenize for tokens with internal punctuation (node.js, c++), or use Intl.Segmenter for CJK / Thai word segmentation. Unicode-aware by default
Available in the full build. See the Token Search docs for details and performance benchmarks.
Logical Search
Combine conditions with $and and $or for complex queries. Available in the full build.
Get character-level match indices for highlighting search results in your UI.
const fuse = new Fuse(list, {
includeMatches: true,
keys: ['title']
})
const result = fuse.search('javscript')
// result[0].matches[0].indices → [[0, 9]]
Single String Matching
Use Fuse.match() to fuzzy-match a pattern against a single string without creating an index. Useful for one-off comparisons or custom filtering.
const result = Fuse.match('javscript', 'JavaScript: The Good Parts')
// → { isMatch: true, score: 0.04, indices: [[0, 9]] }
Fuse.match() does not support useTokenSearch — token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison can't provide. Passing useTokenSearch: true throws an explicit error. Use new Fuse(docs, { useTokenSearch: true }).search(query) for token-search behavior.
Dynamic Collections
Add and remove documents from a live index without rebuilding.
Use the basic build if you only need fuzzy search and want the smallest bundle size.
Documentation
For the full API reference, configuration options, scoring theory, and interactive demos, visit fusejs.io.
Official ports
fuse-swift: Swift port for iOS, macOS, tvOS, watchOS, visionOS, and Linux. Byte-equivalent results, idiomatic Swift API, syncs with each upstream release. Currently in 2.0.0-rc.1.
Supporting Fuse.js
Become a backer or sponsor on GitHub
Become a backer or sponsor on Patreon
One-time donation via PayPal
Develop
See DEVELOPERS.md for setup, scripts, and project structure.
Contribute
See CONTRIBUTING.md for guidelines on issues and pull requests.
krisk/Fuse thuộc nhóm Frontend trên TopGit, cùng 4 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về krisk/Fuse ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/krisk/Fuse là nguồn chính thức.
krisk/Fuse có bao nhiêu sao?
krisk/Fuse có 20.5k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/krisk/Fuse. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
krisk/Fuse có phải mã nguồn mở không?
Có — krisk/Fuse phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/krisk/Fuse.
krisk/Fuse có trang demo không?
Dự án có trang chủ ở https://fusejs.io/. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
krisk/Fuse là gì?
krisk/Fuse (krisk/Fuse) là dự án JavaScript trên GitHub. Theo mô tả gốc: Lightweight fuzzy-search, in JavaScript
krisk/Fuse so với các dự án Frontend khác thế nào?
krisk/Fuse được TopGit xếp vào nhóm Frontend, với 20.5k sao GitHub và viết bằng JavaScript. Xem trang chủ đề Frontend trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
Đọc đầy đủ README ở tab phía trên.
Fuse có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về Fuse.