decord/source/modules/rpc/helpers/validateScope.tsx
github-actions 4f02868c60 chore: update source for alpha 346.4
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4792.js (118.4 MB)
2026-09-11 10:30:06 +00:00

41 lines
1 KiB
TypeScript

// Module ID: 14557
// Function ID: 14558
// Name: validateScope
// Dependencies: [4512, 2]
// Exports: default
// Module 14557 (validateScope)
import Constants from "Constants" /* 4512 */;
import size from "module_2" /* 2 */;
const RPC_SCOPE_CONFIG = Constants.RPC_SCOPE_CONFIG;
const result = size.fileFinishedImporting("modules/rpc/helpers/validateScope.tsx");
export default function validateScope(arr, str) {
closure_0 = arr;
if (null == str) {
return true;
} else if (typeof str === "string") {
return arr.includes(str);
} else if (typeof str !== "object") {
return false;
} else {
const _Array2 = Array;
const isArray = Array.isArray(obj);
let tmp = !isArray;
if (isArray) {
tmp = !obj.some((item) => closure_0.includes(item));
}
let tmp2 = !tmp;
if (tmp) {
const _Array = Array;
const isArray1 = Array.isArray(obj2);
let tmp4 = !isArray1;
if (isArray1) {
tmp4 = !obj2.every((item) => closure_0.includes(item));
}
tmp2 = !tmp4;
}
return tmp2;
}
};