How to use the mem.clear function in mem

To help you get started, we’ve selected a few mem examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github brodybits / prettierx / src / config / resolve-config-editorconfig.js View on Github external
function clearCache() {
  mem.clear(editorconfigSyncWithCache);
  mem.clear(editorconfigAsyncWithCache);
}
github sindresorhus / p-memoize / index.js View on Github external
module.exports.clear = memoized => {
	if (!memoizedFunctions.has(memoized)) {
		throw new Error('Can\'t clear a function that was not memoized!');
	}

	mem.clear(memoizedFunctions.get(memoized));
};
github brodybits / prettierx / src / config / resolve-config-editorconfig.js View on Github external
function clearCache() {
  mem.clear(editorconfigSyncWithCache);
  mem.clear(editorconfigAsyncWithCache);
}
github brodybits / prettierx / src / config / resolve-config.js View on Github external
function clearCache() {
  mem.clear(getExplorerMemoized);
  resolveEditorConfig.clearCache();
}

mem

Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input

MIT
Latest version published 9 months ago

Package Health Score

61 / 100
Full package analysis