Merge and WithLatestFrom in Vanilla JS