UNPKG

@nestia/core

Version:

Super-fast validation decorators of NestJS

19 lines 496 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Singleton = void 0; /** @internal */ class Singleton { constructor(closure_) { this.closure_ = closure_; this.value_ = NOT_MOUNTED_YET; } get() { if (this.value_ === NOT_MOUNTED_YET) this.value_ = this.closure_(); return this.value_; } } exports.Singleton = Singleton; /** @internal */ const NOT_MOUNTED_YET = {}; //# sourceMappingURL=Singleton.js.map