@aws-lambda-powertools/parameters
Version:
The parameters package for the Powertools for AWS Lambda (TypeScript) library
16 lines (15 loc) • 526 B
JavaScript
// These providers are dinamycally intialized on first use of the helper functions
const 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();
}
}
};
export { DEFAULT_PROVIDERS, clearCaches };