initial commit - far from runnable
This commit is contained in:
commit
db057ce342
8614 changed files with 1032171 additions and 0 deletions
17
node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js
generated
vendored
Normal file
17
node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { EmptyError } from '../util/EmptyError';
|
||||
import { operate } from '../util/lift';
|
||||
import { createOperatorSubscriber } from './OperatorSubscriber';
|
||||
export function throwIfEmpty(errorFactory) {
|
||||
if (errorFactory === void 0) { errorFactory = defaultErrorFactory; }
|
||||
return operate(function (source, subscriber) {
|
||||
var hasValue = false;
|
||||
source.subscribe(createOperatorSubscriber(subscriber, function (value) {
|
||||
hasValue = true;
|
||||
subscriber.next(value);
|
||||
}, function () { return (hasValue ? subscriber.complete() : subscriber.error(errorFactory())); }));
|
||||
});
|
||||
}
|
||||
function defaultErrorFactory() {
|
||||
return new EmptyError();
|
||||
}
|
||||
//# sourceMappingURL=throwIfEmpty.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue