UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

17 lines (15 loc) 351 B
'use client'; function memoize(func) { const cache = /* @__PURE__ */ new Map(); return (...args) => { const key = JSON.stringify(args); if (cache.has(key)) { return cache.get(key); } const result = func(...args); cache.set(key, result); return result; }; } export { memoize }; //# sourceMappingURL=memoize.mjs.map