UNPKG

one

Version:

One is a new React Framework that makes Vite serve both native and web.

17 lines (16 loc) 432 B
const cache = /* @__PURE__ */new WeakMap(); function weakMemoObject(obj) { if (!cache.has(obj)) { const memoizedObj = {}; for (const key of Object.keys(obj)) { if (!cache.has(obj[key])) { cache.set(obj[key], obj[key]); } memoizedObj[key] = cache.get(obj[key]); } cache.set(obj, memoizedObj); } return cache.get(obj); } export { weakMemoObject }; //# sourceMappingURL=weakMemo.mjs.map