mirror of
https://github.com/revanced/revanced-website.git
synced 2025-04-29 22:24:31 +02:00
feat: search package name
This commit is contained in:
parent
df59e12780
commit
94bfe7ec77
@ -18,13 +18,19 @@
|
||||
$: searchTermLowerCase = searchTerm?.toLowerCase();
|
||||
|
||||
function search(patch: Patch) {
|
||||
if (
|
||||
patch.description.toLowerCase().includes(searchTermLowerCase) ||
|
||||
patch.name.replace(/-/g, ' ').toLowerCase().includes(searchTermLowerCase)
|
||||
) {
|
||||
return true;
|
||||
function checkPkgName(findTerm: string | boolean, array: any) {
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
if (array[i].name.includes(findTerm)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
return (
|
||||
patch.description.toLowerCase().includes(searchTermLowerCase) ||
|
||||
patch.name.replace(/-/g, ' ').toLowerCase().includes(searchTermLowerCase) ||
|
||||
checkPkgName(searchTermLowerCase, patch.compatiblePackages)
|
||||
);
|
||||
}
|
||||
|
||||
function filterByPackage(findTerm: string | boolean, array: any) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user