fix(core): update

This commit is contained in:
2021-10-03 17:37:03 +02:00
parent de87e314c0
commit d4cea26fb5
15 changed files with 194 additions and 130 deletions

View File

@@ -3,7 +3,6 @@ import * as plugins from './smartfuzzy.plugins';
export class ObjectSorter<T> {
public objectDictionary: T[];
constructor(objectDictionaryArg: T[] = []) {
this.objectDictionary = objectDictionaryArg;
}
@@ -16,11 +15,10 @@ export class ObjectSorter<T> {
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: objectKeysArg
keys: objectKeysArg,
};
const fuse = new plugins.fuseJs<T>(this.objectDictionary, fuseOptions);
const result = fuse.search(stringArg);
return result;
}
}
}