Buckets:

imerfanrajabee's picture
download
raw
770 Bytes
import { EmptyError } from './util/EmptyError';
import { SafeSubscriber } from './Subscriber';
export function firstValueFrom(source, config) {
const hasConfig = typeof config === 'object';
return new Promise((resolve, reject) => {
const subscriber = new SafeSubscriber({
next: (value) => {
resolve(value);
subscriber.unsubscribe();
},
error: reject,
complete: () => {
if (hasConfig) {
resolve(config.defaultValue);
}
else {
reject(new EmptyError());
}
},
});
source.subscribe(subscriber);
});
}
//# sourceMappingURL=firstValueFrom.js.map

Xet Storage Details

Size:
770 Bytes
·
Xet hash:
a635a7082bf6ac005ea6e39f959a4d9838c1255d88bb18b63486fce7ccfb4a32

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.