mirror of
https://github.com/manilarome/the-glorious-startpage.git
synced 2025-01-24 06:08:38 +01:00
decrease the usage of var
This commit is contained in:
parent
2c490585b2
commit
a9b176a483
@ -104,7 +104,7 @@ const populateWebMenu = () => {
|
|||||||
String.prototype.fuzzy = function(term, ratio) {
|
String.prototype.fuzzy = function(term, ratio) {
|
||||||
const string = this.toLowerCase();
|
const string = this.toLowerCase();
|
||||||
const compare = term.toLowerCase();
|
const compare = term.toLowerCase();
|
||||||
const matches = 0;
|
let matches = 0;
|
||||||
|
|
||||||
if (string.indexOf(compare) > -1) return true; // covers basic partial matches
|
if (string.indexOf(compare) > -1) return true; // covers basic partial matches
|
||||||
for (let i = 0; i < compare.length; i++) {
|
for (let i = 0; i < compare.length; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user