Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Integration with normal RxJs streams #21

@baldassarreFe

Description

@baldassarreFe

I am trying to run an interval stream until some input comes from sdtin, however this code:

var RxNode = require('rx-node');
const Rx = require('rxjs');

Rx.Observable
  .interval(100)
  .takeUntil(RxNode.fromStream(process.stdin))
  .subscribe(console.log);

results in:

TypeError: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
    at Object.subscribeToResult (.../node_modules/rxjs/util/subscribeToResult.js:73:27)
    at new TakeUntilSubscriber (.../node_modules/rxjs/operator/takeUntil.js:65:38)
    at TakeUntilOperator.call (.../node_modules/rxjs/operator/takeUntil.js:51:33)
    at Observable.subscribe (.../node_modules/rxjs/Observable.js:42:22)
    at Object.<anonymous> (.../test.js:7:4)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

How do I make RxNode Observables behave like RxJs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions