creating flows with Rx in JavaScript