ravendb
Version:
RavenDB client for Node.js
22 lines • 509 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Lazy = void 0;
class Lazy {
_valueFactory;
_value;
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