mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 18:11:05 +03:30
31 lines
946 B
JavaScript
Vendored
31 lines
946 B
JavaScript
Vendored
import { Subscriber } from '../Subscriber';
|
|
import { Notification } from '../Notification';
|
|
export function materialize() {
|
|
return function materializeOperatorFunction(source) {
|
|
return source.lift(new MaterializeOperator());
|
|
};
|
|
}
|
|
class MaterializeOperator {
|
|
call(subscriber, source) {
|
|
return source.subscribe(new MaterializeSubscriber(subscriber));
|
|
}
|
|
}
|
|
class MaterializeSubscriber extends Subscriber {
|
|
constructor(destination) {
|
|
super(destination);
|
|
}
|
|
_next(value) {
|
|
this.destination.next(Notification.createNext(value));
|
|
}
|
|
_error(err) {
|
|
const destination = this.destination;
|
|
destination.next(Notification.createError(err));
|
|
destination.complete();
|
|
}
|
|
_complete() {
|
|
const destination = this.destination;
|
|
destination.next(Notification.createComplete());
|
|
destination.complete();
|
|
}
|
|
}
|
|
//# sourceMappingURL=materialize.js.map
|