package.dist.emotion-memoize.esm.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of memoize Show documentation
Show all versions of memoize Show documentation
emotion's memoize utility
The newest version!
function memoize(fn) {
var cache = Object.create(null);
return function (arg) {
if (cache[arg] === undefined) cache[arg] = fn(arg);
return cache[arg];
};
}
export { memoize as default };