decord/alpha/source/modules/rpc/helpers/validateScope.tsx
github-actions 45f5884862 chore: update source for alpha 348.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5012.js (118.4 MB)
2026-09-23 06:49:31 +00:00

41 lines
1 KiB
TypeScript

// Module ID: 14869
// Function ID: 14870
// Name: validateScope
// Dependencies: [4731, 2]
// Exports: default
// Module 14869 (validateScope)
import Constants from "Constants" /* 4731 */;
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;
}
};