alinea
Version:
[](https://npmjs.org/package/alinea) [](https://packagephobia.com/result?p=alinea)
22 lines (20 loc) • 422 B
JavaScript
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
};