If by filter you mean something like:
let emitted = false;
obs = obs.filter(x => {
if(emitted) {
return false;
} else {
emitted = true;
return true;
}
});
Filter (in this particular case, check the code above)
Will emit as soon as first item appears.
Will ignore all subsequent items.
Will complete when source observable completes.
in : -1-2-3--|---
out: -1------|---
First
Will emit as soon as first item appears.
Will complete right after that.
in : -1-2-3--|---
out: -1|----------
Single
Will fail if source observable emits several events.
in : -1-2-3--|---
out: -1-X---------
Will emit when source observable completes (and single
can be sure nothing more can be emitted). Will complete right after that.
in : -1------|---
out: --------1|--