node-ejs-renderer/node_modules/@jsonjoy.com/util/lib/lazyFunction.js

14 lines
366 B
JavaScript
Raw Permalink Normal View History

2024-06-09 13:55:01 -04:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.lazy = void 0;
const lazy = (factory) => {
let generated;
const fn = (...args) => {
if (!generated)
generated = factory();
return generated.apply(null, args);
};
return fn;
};
exports.lazy = lazy;
//# sourceMappingURL=lazyFunction.js.map