decord/source/7304_removeTrailingSlash.js
2026-07-23 10:11:24 +00:00

36 lines
800 B
JavaScript

// Module ID: 7304
// Function ID: 58954
// Name: removeTrailingSlash
// Dependencies: []
// Module 7304 (removeTrailingSlash)
function removeTrailingSlash(arr) {
let substr = arr;
if ("/" === arr[arr.length - 1]) {
substr = arr.slice(0, -1);
}
return substr;
}
arg5.isSentryRequestUrl = function isSentryRequestUrl(arr, getDsn) {
let dsn = getDsn;
if (getDsn) {
dsn = getDsn.getDsn();
}
let tunnel = getDsn;
if (getDsn) {
tunnel = getDsn.getOptions().tunnel;
}
let hasItem = !tmp2;
if (!!dsn) {
hasItem = arr.includes(dsn.host);
}
if (!hasItem) {
let flag = false;
if (tunnel) {
flag = removeTrailingSlash(arr) === removeTrailingSlash(tunnel);
const tmp5 = removeTrailingSlash(arr);
}
hasItem = flag;
}
return hasItem;
};