decord/source/modules/rpc/helpers/validateScope.tsx
github-actions 67d978d9fb chore: update source for alpha 346.0
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9672_m.js (378.6 MB)
2026-09-07 16:44:02 +00:00

41 lines
1.1 KiB
TypeScript

// Module ID: 14505
// Function ID: 14506
// Name: validateScope
// Dependencies: [4465, 2]
// Exports: default
// Module 14505 (validateScope)
import set from "set" /* 2 */;
import RPC_SCOPE_CONFIG2 from "RPC_SCOPE_CONFIG" /* 4465 */;
let RPC_SCOPE_CONFIG = RPC_SCOPE_CONFIG2.RPC_SCOPE_CONFIG;
const result = set.fileFinishedImporting("modules/rpc/helpers/validateScope.tsx");
export default function validateScope(arr, str) {
RPC_SCOPE_CONFIG = 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((arg0) => arr.includes(arg0));
}
let tmp2 = !tmp;
if (tmp) {
const _Array = Array;
const isArray1 = Array.isArray(obj2);
let tmp4 = !isArray1;
if (isArray1) {
tmp4 = !obj2.every((arg0) => arr.includes(arg0));
}
tmp2 = !tmp4;
}
return tmp2;
}
};