UNPKG

@aws-lambda-powertools/parameters

Version:
20 lines (19 loc) 700 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.clearCaches = exports.DEFAULT_PROVIDERS = void 0; // These providers are dinamycally intialized on first use of the helper functions const DEFAULT_PROVIDERS = {}; exports.DEFAULT_PROVIDERS = DEFAULT_PROVIDERS; /** * Utility function to clear all the caches of the default providers. * * This is useful when you want to clear the cache of all the providers at once, for example during testing. */ const clearCaches = () => { for (const provider of Object.values(DEFAULT_PROVIDERS)) { if (provider.clearCache) { provider.clearCache(); } } }; exports.clearCaches = clearCaches;