Compare commits

..

No commits in common. "main" and "1.0.4" have entirely different histories.
main ... 1.0.4

3 changed files with 5 additions and 4 deletions

View file

@ -1,10 +1,10 @@
{
"name": "permission-checker",
"version": "1.0.7",
"version": "1.0.4",
"description": "A permission checker for Node JS",
"main": "build/index.js",
"types": "build/index.d.ts",
"type": "module",
"type": "commonjs",
"repository": "https://github.com/ThunderNetworkRaD/TS-Permission-Checker",
"author": "ThunderNetworkRaD | Killer Boss Original",
"license": "Mozilla Public License 2.0",

View file

@ -17,6 +17,7 @@ function checkSingle(perm: string, reqPerm: string) {
let i = 0;
for (const rp of subRP) {
i = subRP.findIndex((e) => e === rp)
console.log(i, rp, sub[i], subRP.length)
if (rp != sub[i]) break;
else i++;
}
@ -53,4 +54,4 @@ function checkList(perm: string[], reqPerm: string[]) {
export default {
checkList,
checkSingle
}
}

View file

@ -25,7 +25,7 @@
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "ESNext", /* Specify what module code is generated. */
"module": "CommonJS", /* Specify what module code is generated. */
"rootDir": "src", /* Specify the root folder within your source files. */
"moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */