DerGoogler / MMRL

Introducing Magisk Module Repo Loader (MMRL) - the ultimate module manager for Magisk, KernelSU and APatch on Android. This highly configurable app allows users to manage modules effortlessly, all while being completely free of ads.

Home Page:https://mmrl.dergoogler.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check for low quality modules

DerGoogler opened this issue · comments

Some modules don't meet the required module props, so we will show a warning or a red border radius

Code sample

const prop1 = {
   id: "xhhttp",
   name: "xh for Android",
   version: "v0.18.0",
   versionCode: "0180",
   author: "ducaale & Der_Googler",
   // description: "Friendly and fast tool for sending HTTP requests"
}

const prop2 = {
   id: "xhhttp",
   name: "xh for Android",
   version: "v0.18.0",
   versionCode: "0180",
   author: "ducaale & Der_Googler",
   description: "Friendly and fast tool for sending HTTP requests"
}


const isLowQuality = (props) => {
   const requiredProp = ["id", "name", "version", "versionCode", "author", "description"];
   const result = requiredProp.reduce(function(i, j) { return i && j in props }, true);
   return !result
}


// description is missing and will trigger an low quality module
console.log(isLowQuality(prop1))

// if all required props included then it won't trigger an low quality module
console.log(isLowQuality(prop2))