Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
init(
documentCachingOptions: DocumentCachingOptions = {
maxDocumentsInCache: 10,
maxAgeSecondsforDocumentsInCache: 5 * 24 * 60 * 60,
timeoutSeconds: 3,
},
fallbackOfflinePageUrl?: string,
): AmpNavigationRoute {
enableNagigationPreload();
const navigationPreloadOptions: {
whitelist?: Array;
blacklist?: Array;
} = {};
// create regexp Array from parsing the string array
if (documentCachingOptions.allowList) {
navigationPreloadOptions.whitelist = documentCachingOptions.allowList;
} else if (documentCachingOptions.denyList) {
navigationPreloadOptions.blacklist = documentCachingOptions.denyList;
}
if (
documentCachingOptions.timeoutSeconds &&
documentCachingOptions.timeoutSeconds > 5
) {