Buckets:
| ; | |
| Object.defineProperty(exports, "__esModule", { value: true }); | |
| exports.lastValueFrom = void 0; | |
| var EmptyError_1 = require("./util/EmptyError"); | |
| function lastValueFrom(source, config) { | |
| var hasConfig = typeof config === 'object'; | |
| return new Promise(function (resolve, reject) { | |
| var _hasValue = false; | |
| var _value; | |
| source.subscribe({ | |
| next: function (value) { | |
| _value = value; | |
| _hasValue = true; | |
| }, | |
| error: reject, | |
| complete: function () { | |
| if (_hasValue) { | |
| resolve(_value); | |
| } | |
| else if (hasConfig) { | |
| resolve(config.defaultValue); | |
| } | |
| else { | |
| reject(new EmptyError_1.EmptyError()); | |
| } | |
| }, | |
| }); | |
| }); | |
| } | |
| exports.lastValueFrom = lastValueFrom; | |
| //# sourceMappingURL=lastValueFrom.js.map |
Xet Storage Details
- Size:
- 969 Bytes
- Xet hash:
- 43e9cf67de01c1e6eee65b221e8e1f82c000a645471f98c8ed4ccc7b780bc8e1
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.