This commit is contained in:
Kirollos Risk 2017-05-09 09:43:14 -04:00
parent 3f9cb5e791
commit ebad889683
5 changed files with 19 additions and 20 deletions

6
dist/fuse.js vendored
View File

@ -1,5 +1,5 @@
/*!
* Fuse.js v3.0.0 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v3.0.1 - Lightweight fuzzy-search (http://fusejs.io)
*
* Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me)
* All Rights Reserved. Apache Software License 2.0
@ -432,7 +432,6 @@ module.exports = function (text, pattern, patternAlphabet, _ref) {
var finalScore = 1;
var binMax = patternLen + textLen;
var locations = [];
var mask = 1 << patternLen - 1;
for (var _i = 0; _i < patternLen; _i += 1) {
@ -500,7 +499,6 @@ module.exports = function (text, pattern, patternAlphabet, _ref) {
// Indeed it is
currentThreshold = finalScore;
bestLocation = currentLocation;
locations.push(bestLocation);
// Already passed `loc`, downhill from here on in.
if (bestLocation <= expectedLocation) {
@ -513,7 +511,7 @@ module.exports = function (text, pattern, patternAlphabet, _ref) {
}
}
// No hope for a (better) match at greater error levels.
// No hope for a (better) match at greater error levels.
var _score2 = bitapScore(pattern, {
errors: _i + 1,
currentLocation: expectedLocation,

2
dist/fuse.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/fuse.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,11 +1,11 @@
{
"name": "fuse.js",
"author": {
"name" : "Kirollos Risk",
"email" : "kirollos@gmail.com",
"url" : "http://kiro.me"
"author": {
"name": "Kirollos Risk",
"email": "kirollos@gmail.com",
"url": "http://kiro.me"
},
"version": "3.0.0",
"version": "3.0.1",
"description": "Lightweight fuzzy-search",
"license": "Apache",
"types": "./index.d.ts",
@ -15,7 +15,10 @@
},
"homepage": "http://fusejs.io",
"dependencies": {},
"keywords": ["fuzzy", "bitap"],
"keywords": [
"fuzzy",
"bitap"
],
"main": "dist/fuse.js",
"scripts": {
"test": "vows test/**.js",
@ -23,12 +26,12 @@
"dev": "WEBPACK_ENV=dev webpack --progress --colors --watch"
},
"devDependencies": {
"webpack": "^2.4.1",
"babel-core": "^6.24.1",
"babel-loader": "^6.4.1",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"babel-plugin-add-module-exports": "0.2.1",
"vows": "0.5.x"
"babel-preset-es2015": "6.24.1",
"babel-preset-stage-2": "6.24.1",
"vows": "0.5.x",
"webpack": "^2.4.1"
}
}

View File

@ -48,7 +48,6 @@ module.exports = (text, pattern, patternAlphabet, { location = 0, distance = 100
let finalScore = 1
let binMax = patternLen + textLen
const locations = []
const mask = 1 << (patternLen - 1)
for (let i = 0; i < patternLen; i += 1) {
@ -116,7 +115,6 @@ module.exports = (text, pattern, patternAlphabet, { location = 0, distance = 100
// Indeed it is
currentThreshold = finalScore
bestLocation = currentLocation
locations.push(bestLocation)
// Already passed `loc`, downhill from here on in.
if (bestLocation <= expectedLocation) {
@ -129,7 +127,7 @@ module.exports = (text, pattern, patternAlphabet, { location = 0, distance = 100
}
}
// No hope for a (better) match at greater error levels.
// No hope for a (better) match at greater error levels.
const score = bitapScore(pattern, {
errors: i + 1,
currentLocation: expectedLocation,