UNPKG

nuxt

Version:

Nuxt is a free and open-source framework with an intuitive and extendable way to create type-safe, performant and production-grade full-stack web applications and websites with Vue.js.

14 lines (13 loc) • 261 B
//#region src/runtime/server/renderer/cache.ts function lazyCachedFunction(fn) { let res = null; return () => { if (res === null) res = fn().catch((err) => { res = null; throw err; }); return res; }; } //#endregion export { lazyCachedFunction };