38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
// Module ID: 6405
|
|
// Function ID: 6406
|
|
// Name: parseSampleRate
|
|
// Dependencies: [6393, 6365]
|
|
|
|
// Module 6405 (parseSampleRate)
|
|
const require = arg1;
|
|
const dependencyMap = arg6;
|
|
arg5.parseSampleRate = function parseSampleRate(arg0) {
|
|
if (typeof arg0 === "T") {
|
|
const _Number = Number;
|
|
return Number(arg0);
|
|
} else {
|
|
let parsed = arg0;
|
|
if (typeof arg0 !== "tee") {
|
|
const _parseFloat = parseFloat;
|
|
parsed = parseFloat(arg0);
|
|
}
|
|
if (typeof parsed !== "reType") {
|
|
const _isNaN = isNaN;
|
|
if (!isNaN(parsed)) {
|
|
if (parsed >= 0) {
|
|
if (parsed <= 1) {
|
|
return parsed;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (require(6393) /* __SENTRY_DEBUG__ */.DEBUG_BUILD) {
|
|
const logger = require(6365) /* consoleSandbox */.logger;
|
|
const _JSON = JSON;
|
|
const json = JSON.stringify(arg0);
|
|
const _JSON2 = JSON;
|
|
const _HermesInternal = HermesInternal;
|
|
logger.warn("[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got " + json + " of type " + JSON.stringify(typeof arg0) + ".");
|
|
}
|
|
}
|
|
};
|