Skip to content

Commit

Permalink
Build 6.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
krisk committed Jun 17, 2020
1 parent 9136c6e commit be05938
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 109 deletions.
26 changes: 6 additions & 20 deletions dist/fuse.basic.common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Fuse.js v6.2.0-beta.1 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.2.0 - Lightweight fuzzy-search (http://fusejs.io)
*
* Copyright (c) 2020 Kiro Risk (http://kiro.me)
* All Rights Reserved. Apache Software License 2.0
Expand Down Expand Up @@ -340,10 +340,7 @@ var AdvancedOptions = {
// When `true`, the calculation for the relevance score (used for sorting) will
// ignore the field-length norm.
// More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm
ignoreFieldNorm: false,
// When `true`, if the search query is empty, return the whole list instead
// of an empty array.
matchEmptyQuery: false
ignoreFieldNorm: false
};
var Config = _objectSpread2({}, BasicOptions, {}, MatchOptions, {}, FuzzyOptions, {}, AdvancedOptions);

Expand Down Expand Up @@ -551,7 +548,8 @@ function createIndex(keys, docs) {
var myIndex = new FuseIndex({
getFn: getFn
});
myIndex.setKeys(keys);
var keyStore = new KeyStore(keys);
myIndex.setKeys(keyStore.keys());
myIndex.setSources(docs);
myIndex.create();
return myIndex;
Expand Down Expand Up @@ -1183,19 +1181,7 @@ var Fuse = /*#__PURE__*/function () {
includeScore = _this$options.includeScore,
shouldSort = _this$options.shouldSort,
sortFn = _this$options.sortFn,
ignoreFieldNorm = _this$options.ignoreFieldNorm,
matchEmptyQuery = _this$options.matchEmptyQuery;

if (matchEmptyQuery && (!isDefined(query) || isBlank(query))) {
return this._docs.map(function (doc, idx) {
return {
item: doc,
score: 1,
refIndex: idx
};
});
}

ignoreFieldNorm = _this$options.ignoreFieldNorm;
var results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);
computeScore$1(results, this._keyStore, {
ignoreFieldNorm: ignoreFieldNorm
Expand Down Expand Up @@ -1406,7 +1392,7 @@ function format(results, docs) {
});
}

Fuse.version = '6.2.0-beta.1';
Fuse.version = '6.2.0';
Fuse.createIndex = createIndex;
Fuse.parseIndex = parseIndex;
Fuse.config = Config;
Expand Down
27 changes: 8 additions & 19 deletions dist/fuse.basic.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Fuse.js v6.2.0-beta.1 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.2.0 - Lightweight fuzzy-search (http://fusejs.io)
*
* Copyright (c) 2020 Kiro Risk (http://kiro.me)
* All Rights Reserved. Apache Software License 2.0
Expand Down Expand Up @@ -218,10 +218,7 @@ const AdvancedOptions = {
// When `true`, the calculation for the relevance score (used for sorting) will
// ignore the field-length norm.
// More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm
ignoreFieldNorm: false,
// When `true`, if the search query is empty, return the whole list instead
// of an empty array.
matchEmptyQuery: false
ignoreFieldNorm: false
};

var Config = {
Expand Down Expand Up @@ -392,16 +389,17 @@ class FuseIndex {
}

function createIndex(keys, docs, { getFn = Config.getFn } = {}) {
let myIndex = new FuseIndex({ getFn });
myIndex.setKeys(keys);
const myIndex = new FuseIndex({ getFn });
const keyStore = new KeyStore(keys);
myIndex.setKeys(keyStore.keys());
myIndex.setSources(docs);
myIndex.create();
return myIndex
}

function parseIndex(data, { getFn = Config.getFn } = {}) {
const { keys, records } = data;
let myIndex = new FuseIndex({ getFn });
const myIndex = new FuseIndex({ getFn });
myIndex.setKeys(keys);
myIndex.setIndexRecords(records);
return myIndex
Expand Down Expand Up @@ -986,18 +984,9 @@ class Fuse {
includeScore,
shouldSort,
sortFn,
ignoreFieldNorm,
matchEmptyQuery
ignoreFieldNorm
} = this.options;

if (matchEmptyQuery && (!isDefined(query) || isBlank(query))) {
return this._docs.map((doc, idx) => ({
item: doc,
score: 1,
refIndex: idx
}))
}

let results = isString(query)
? isString(this._docs[0])
? this._searchStringList(query)
Expand Down Expand Up @@ -1179,7 +1168,7 @@ function format(
})
}

Fuse.version = '6.2.0-beta.1';
Fuse.version = '6.2.0';
Fuse.createIndex = createIndex;
Fuse.parseIndex = parseIndex;
Fuse.config = Config;
Expand Down
4 changes: 2 additions & 2 deletions dist/fuse.basic.esm.min.js

Large diffs are not rendered by default.

26 changes: 6 additions & 20 deletions dist/fuse.basic.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Fuse.js v6.2.0-beta.1 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.2.0 - Lightweight fuzzy-search (http://fusejs.io)
*
* Copyright (c) 2020 Kiro Risk (http://kiro.me)
* All Rights Reserved. Apache Software License 2.0
Expand Down Expand Up @@ -344,10 +344,7 @@
// When `true`, the calculation for the relevance score (used for sorting) will
// ignore the field-length norm.
// More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm
ignoreFieldNorm: false,
// When `true`, if the search query is empty, return the whole list instead
// of an empty array.
matchEmptyQuery: false
ignoreFieldNorm: false
};
var Config = _objectSpread2({}, BasicOptions, {}, MatchOptions, {}, FuzzyOptions, {}, AdvancedOptions);

Expand Down Expand Up @@ -555,7 +552,8 @@
var myIndex = new FuseIndex({
getFn: getFn
});
myIndex.setKeys(keys);
var keyStore = new KeyStore(keys);
myIndex.setKeys(keyStore.keys());
myIndex.setSources(docs);
myIndex.create();
return myIndex;
Expand Down Expand Up @@ -1187,19 +1185,7 @@
includeScore = _this$options.includeScore,
shouldSort = _this$options.shouldSort,
sortFn = _this$options.sortFn,
ignoreFieldNorm = _this$options.ignoreFieldNorm,
matchEmptyQuery = _this$options.matchEmptyQuery;

if (matchEmptyQuery && (!isDefined(query) || isBlank(query))) {
return this._docs.map(function (doc, idx) {
return {
item: doc,
score: 1,
refIndex: idx
};
});
}

ignoreFieldNorm = _this$options.ignoreFieldNorm;
var results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);
computeScore$1(results, this._keyStore, {
ignoreFieldNorm: ignoreFieldNorm
Expand Down Expand Up @@ -1410,7 +1396,7 @@
});
}

Fuse.version = '6.2.0-beta.1';
Fuse.version = '6.2.0';
Fuse.createIndex = createIndex;
Fuse.parseIndex = parseIndex;
Fuse.config = Config;
Expand Down
4 changes: 2 additions & 2 deletions dist/fuse.basic.min.js

Large diffs are not rendered by default.

26 changes: 6 additions & 20 deletions dist/fuse.common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Fuse.js v6.2.0-beta.1 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.2.0 - Lightweight fuzzy-search (http://fusejs.io)
*
* Copyright (c) 2020 Kiro Risk (http://kiro.me)
* All Rights Reserved. Apache Software License 2.0
Expand Down Expand Up @@ -418,10 +418,7 @@ var AdvancedOptions = {
// When `true`, the calculation for the relevance score (used for sorting) will
// ignore the field-length norm.
// More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm
ignoreFieldNorm: false,
// When `true`, if the search query is empty, return the whole list instead
// of an empty array.
matchEmptyQuery: false
ignoreFieldNorm: false
};
var Config = _objectSpread2({}, BasicOptions, {}, MatchOptions, {}, FuzzyOptions, {}, AdvancedOptions);

Expand Down Expand Up @@ -629,7 +626,8 @@ function createIndex(keys, docs) {
var myIndex = new FuseIndex({
getFn: getFn
});
myIndex.setKeys(keys);
var keyStore = new KeyStore(keys);
myIndex.setKeys(keyStore.keys());
myIndex.setSources(docs);
myIndex.create();
return myIndex;
Expand Down Expand Up @@ -1823,19 +1821,7 @@ var Fuse = /*#__PURE__*/function () {
includeScore = _this$options.includeScore,
shouldSort = _this$options.shouldSort,
sortFn = _this$options.sortFn,
ignoreFieldNorm = _this$options.ignoreFieldNorm,
matchEmptyQuery = _this$options.matchEmptyQuery;

if (matchEmptyQuery && (!isDefined(query) || isBlank(query))) {
return this._docs.map(function (doc, idx) {
return {
item: doc,
score: 1,
refIndex: idx
};
});
}

ignoreFieldNorm = _this$options.ignoreFieldNorm;
var results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);
computeScore$1(results, this._keyStore, {
ignoreFieldNorm: ignoreFieldNorm
Expand Down Expand Up @@ -2118,7 +2104,7 @@ function format(results, docs) {
});
}

Fuse.version = '6.2.0-beta.1';
Fuse.version = '6.2.0';
Fuse.createIndex = createIndex;
Fuse.parseIndex = parseIndex;
Fuse.config = Config;
Expand Down
2 changes: 1 addition & 1 deletion dist/fuse.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Type definitions for Fuse.js v6.2.0-beta.0
// Type definitions for Fuse.js v6.2.0
// TypeScript v3.9.5

export default Fuse
Expand Down
27 changes: 8 additions & 19 deletions dist/fuse.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Fuse.js v6.2.0-beta.1 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.2.0 - Lightweight fuzzy-search (http://fusejs.io)
*
* Copyright (c) 2020 Kiro Risk (http://kiro.me)
* All Rights Reserved. Apache Software License 2.0
Expand Down Expand Up @@ -216,10 +216,7 @@ const AdvancedOptions = {
// When `true`, the calculation for the relevance score (used for sorting) will
// ignore the field-length norm.
// More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm
ignoreFieldNorm: false,
// When `true`, if the search query is empty, return the whole list instead
// of an empty array.
matchEmptyQuery: false
ignoreFieldNorm: false
};

var Config = {
Expand Down Expand Up @@ -390,16 +387,17 @@ class FuseIndex {
}

function createIndex(keys, docs, { getFn = Config.getFn } = {}) {
let myIndex = new FuseIndex({ getFn });
myIndex.setKeys(keys);
const myIndex = new FuseIndex({ getFn });
const keyStore = new KeyStore(keys);
myIndex.setKeys(keyStore.keys());
myIndex.setSources(docs);
myIndex.create();
return myIndex
}

function parseIndex(data, { getFn = Config.getFn } = {}) {
const { keys, records } = data;
let myIndex = new FuseIndex({ getFn });
const myIndex = new FuseIndex({ getFn });
myIndex.setKeys(keys);
myIndex.setIndexRecords(records);
return myIndex
Expand Down Expand Up @@ -1411,18 +1409,9 @@ class Fuse {
includeScore,
shouldSort,
sortFn,
ignoreFieldNorm,
matchEmptyQuery
ignoreFieldNorm
} = this.options;

if (matchEmptyQuery && (!isDefined(query) || isBlank(query))) {
return this._docs.map((doc, idx) => ({
item: doc,
score: 1,
refIndex: idx
}))
}

let results = isString(query)
? isString(this._docs[0])
? this._searchStringList(query)
Expand Down Expand Up @@ -1662,7 +1651,7 @@ function format(
})
}

Fuse.version = '6.2.0-beta.1';
Fuse.version = '6.2.0';
Fuse.createIndex = createIndex;
Fuse.parseIndex = parseIndex;
Fuse.config = Config;
Expand Down
Loading

0 comments on commit be05938

Please sign in to comment.