@configurator/ravendb
Version:
RavenDB client for Node.js
20 lines • 478 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Lazy = void 0;
class Lazy {
constructor(valueFactory) {
this._valueFactory = valueFactory;
}
isValueCreated() {
return !!this._value;
}
async getValue() {
if (this._value) {
return this._value;
}
this._value = this._valueFactory();
return this._value;
}
}
exports.Lazy = Lazy;
//# sourceMappingURL=Lazy.js.map