Extracted stream impl to GOTOJS.