UNPKG

@chakra-ui/react

Version:

Responsive and accessible React UI components built with React and Emotion

15 lines (12 loc) 338 B
"use strict"; import stringify from 'fast-safe-stringify'; const memo = (fn) => { const cache = /* @__PURE__ */ Object.create(null); function get(...args) { const key = args.map((v) => stringify(v)).join("|"); if (cache[key] === void 0) cache[key] = fn(...args); return cache[key]; } return get; }; export { memo };