Buckets:
| import { EmptyError } from './util/EmptyError'; | |
| export 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()); | |
| } | |
| }, | |
| }); | |
| }); | |
| } | |
| //# sourceMappingURL=lastValueFrom.js.map |
Xet Storage Details
- Size:
- 814 Bytes
- Xet hash:
- 0248e9d07129d95d9763deac1c9f098c4a9e7e3e6c3baf76985ee72b3134d872
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.