UNPKG

alinea

Version:

[![npm](https://img.shields.io/npm/v/alinea.svg)](https://npmjs.org/package/alinea) [![install size](https://packagephobia.com/badge?p=alinea)](https://packagephobia.com/result?p=alinea)

22 lines (20 loc) 422 B
import "../../chunks/chunk-U5RRZUYZ.js"; // src/core/util/Lazy.ts var Lazy; ((Lazy2) => { const memo = /* @__PURE__ */ new WeakMap(); function get(lazy) { if (typeof lazy === "function") { if (memo.has(lazy)) return memo.get(lazy); const value = lazy(); memo.set(lazy, value); return value; } return lazy; } Lazy2.get = get; })(Lazy || (Lazy = {})); export { Lazy };