decord/source/modules/rpc/helpers/validateScope.tsx
github-actions 7450227d0b chore: update source for alpha 345.4
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9596_m.js (380.6 MB)
2026-09-04 17:41:35 +00:00

41 lines
1.1 KiB
TypeScript

// Module ID: 14427
// Function ID: 14428
// Name: validateScope
// Dependencies: [4383, 2]
// Exports: default
// Module 14427 (validateScope)
import set from "set" /* 2 */;
import RPC_SCOPE_CONFIG2 from "RPC_SCOPE_CONFIG" /* 4383 */;
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;
}
};