-
-
Notifications
You must be signed in to change notification settings - Fork 772
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
982 additions
and
704 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ test/index.html | |
latest.zip | ||
.DS_Store | ||
.idea | ||
runner.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Version 2.0.0 | ||
|
||
- Modified search algorithm to search individual words AND the full string, computing the final score as a function of both. This yields better scoring accuracy (#41) | ||
- Changed exact substrings to not have a score of zero. That is searching for "hell" in "hello" will not yield a score of zero, while searching for "hello" will (#63) | ||
- Added `verbose` option, which will print to the console useful information, mostly for debugging | ||
- Improved code structure. | ||
- Added version information within Fuse itself | ||
- Added this Changelog (#64) | ||
- Added fallback when pattern length is greater than machine word length (i.e, > 32 characters) (#38) | ||
- Allowed results with a value of 0 to be returned (#73) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "fuse.js", | ||
"version": "1.3.1", | ||
"version": "2.0.0", | ||
"main": "./src/fuse.js", | ||
"ignore": [ | ||
"test" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Fuse = require('./src/fuse') | ||
|
||
var items = [ | ||
// 'Borwaila hamlet', | ||
// 'Bobe hamlet', | ||
'Boma', | ||
'Bo'] | ||
var fuse = new Fuse(items, { | ||
include: ['score'], | ||
verbose: true | ||
}) | ||
var result = fuse.search('Bosdflkj sdlkfjs dlkfjsdlkfjsldkfj sldkfj slkdjflksdjflksdjf lkdsjf lksjdf lksjdflkjsd lkfj ') | ||
|
||
// var items = ['FH Mannheim', 'University Mannheim'] | ||
// var fuse = new Fuse(items, { | ||
// verbose: true | ||
// }) | ||
// var result = fuse.search('Uni Mannheim') | ||
|
||
return |
Oops, something went wrong.