replaced fusejs in Emojiboard

This commit is contained in:
unknown 2021-08-25 15:00:40 +05:30
parent c06a92e0ae
commit 633d59c13b
3 changed files with 30 additions and 39 deletions

View file

@ -57,6 +57,10 @@ class AsyncSearch extends EventEmitter {
this.term = (this.isCaseSensitive) ? term : term.toLocaleLowerCase();
if (this.ignoreWhitespace) this.term = this.term.replace(' ', '');
if (this.term === '') {
this._sendFindings();
return;
}
this._find(this.sessionStartTimestamp, 0);
}
@ -117,7 +121,7 @@ class AsyncSearch extends EventEmitter {
}
_sendFindings() {
this.emit(this.RESULT_SENT, this.findingList);
this.emit(this.RESULT_SENT, this.findingList, this.term);
}
}