decord/source/modules/rpc/helpers/validateScope.tsx

42 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 13970
// Function ID: 13971
2026-07-20 16:05:17 +00:00
// Name: validateScope
2026-08-25 06:04:03 +00:00
// Dependencies: [4282, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 13970 (validateScope)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
2026-08-25 06:04:03 +00:00
import RPC_SCOPE_CONFIG2 from "RPC_SCOPE_CONFIG" /* 4282 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
let RPC_SCOPE_CONFIG = RPC_SCOPE_CONFIG2.RPC_SCOPE_CONFIG;
const result = set.fileFinishedImporting("modules/rpc/helpers/validateScope.tsx");
2026-07-20 16:05:17 +00:00
2026-08-04 21:03:28 +00:00
export default function validateScope(arr, str) {
2026-08-24 06:08:38 +00:00
RPC_SCOPE_CONFIG = arr;
2026-08-04 21:03:28 +00:00
if (null == str) {
2026-07-20 16:05:17 +00:00
return true;
2026-08-04 21:03:28 +00:00
} else if (typeof str === "string") {
return arr.includes(str);
} else if (typeof str !== "object") {
2026-07-20 16:05:17 +00:00
return false;
} else {
const _Array2 = Array;
2026-07-29 08:29:29 +00:00
const isArray = Array.isArray(obj);
let tmp = !isArray;
if (isArray) {
tmp = !obj.some((arg0) => arr.includes(arg0));
}
2026-07-20 16:05:17 +00:00
let tmp2 = !tmp;
if (tmp) {
const _Array = Array;
2026-07-29 08:29:29 +00:00
const isArray1 = Array.isArray(obj2);
let tmp4 = !isArray1;
if (isArray1) {
tmp4 = !obj2.every((arg0) => arr.includes(arg0));
}
tmp2 = !tmp4;
2026-07-20 16:05:17 +00:00
}
return tmp2;
}
};