decord/source/modules/rpc/helpers/validateScope.tsx
2026-08-06 08:05:19 +00:00

39 lines
996 B
TypeScript

// Module ID: 13683
// Function ID: 13684
// Name: validateScope
// Dependencies: [4188, 2]
// Exports: default
// Module 13683 (validateScope)
import { RPC_SCOPE_CONFIG } from "RPC_SCOPE_CONFIG";
const result = require("set").fileFinishedImporting("modules/rpc/helpers/validateScope.tsx");
export default function validateScope(arr, str) {
const 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;
}
};