1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2026-03-16 07:35:45 +01:00

Enforcing eslint rule

This commit is contained in:
Max Guglielmi 2017-05-25 13:51:44 +10:00
commit 11e15f0482
18 changed files with 36 additions and 35 deletions

View file

@ -14,7 +14,7 @@ export const trim = (text) => {
return text.trim();
}
return text.replace(/^\s*|\s*$/g, '');
}
};
/**
* Checks if passed string is empty
@ -32,7 +32,7 @@ export const rgxEsc = (text) => {
let chars = /[-\/\\^$*+?.()|[\]{}]/g;
let escMatch = '\\$&';
return String(text).replace(chars, escMatch);
}
};
/**
* Returns passed string as lowercase if caseSensitive flag set false. By
@ -45,7 +45,7 @@ export const matchCase = (text, caseSensitive = false) => {
return text.toLowerCase();
}
return text;
}
};
/**
* Checks if passed data contains the searched term
@ -73,4 +73,4 @@ export const contains = (term, data, exactMatch = false, caseSensitive = false,
regexp = new RegExp(rgxEsc(term), modifier);
}
return regexp.test(data);
}
};