lazyFunction.js 366 B

1234567891011121314
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.lazy = void 0;
  4. const lazy = (factory) => {
  5. let generated;
  6. const fn = (...args) => {
  7. if (!generated)
  8. generated = factory();
  9. return generated.apply(null, args);
  10. };
  11. return fn;
  12. };
  13. exports.lazy = lazy;
  14. //# sourceMappingURL=lazyFunction.js.map