1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-07 10:46:24 +03:00

order User completions by last spoken

This commit is contained in:
Aviral Dasgupta
2017-02-10 22:34:52 +05:30
parent c7d0652762
commit 0653343319
5 changed files with 109 additions and 16 deletions

View File

@@ -14,7 +14,12 @@ class KeyMap {
const DEFAULT_RESULT_COUNT = 10;
const DEFAULT_DISTANCE = 5;
export default class FuzzyMatcher {
// FIXME Until Fuzzy matching works better, we use prefix matching.
import PrefixMatcher from './QueryMatcher';
export default PrefixMatcher;
class FuzzyMatcher {
/**
* Given an array of objects and keys, returns a KeyMap
* Keys can refer to object properties by name and as in JavaScript (for nested properties)