@mikezimm/fps-core-v7
Version:
Library of reusable core interfaces, types and constants migrated from fps-library-v2
19 lines • 1.14 kB
JavaScript
import { AnalyticsWebAbsolute, SecureCDNalyticsWebAbsolute } from "../../../../restAPIs/logging/interfaces/constants";
import { CurrentSiteAbsolute } from "../../source-props/WindowLocationConstants";
// import { CurrentSiteAbsolute } from "../../../../logic/Strings/getSiteCollectionUrlFromLink";
export function getCurrentFPSDigest() {
const thisWindow = window;
if (!thisWindow.FPSDigestValues) {
let fpsWindowProps = {
// DO not really need these replacements of last slash but keeping for safety
AnalyticsWeb: { url: AnalyticsWebAbsolute.replace(/\/$/, ''), digestValue: '', time: 0, new: 0, queries: 0, },
CurrentSite: { url: CurrentSiteAbsolute.replace(/\/$/, ''), digestValue: '', time: 0, new: 0, queries: 0 },
SecureCDNAlyticsWeb: { url: SecureCDNalyticsWebAbsolute.replace(/\/$/, ''), digestValue: '', time: 0, new: 0, queries: 0 },
sites: [],
performance: [],
};
thisWindow.FPSDigestValues = fpsWindowProps;
}
return thisWindow.FPSDigestValues;
}
//# sourceMappingURL=getCurrentFPSDigest.js.map