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

Integration with normal RxJs streams #21

Open
baldassarreFe opened this issue Mar 14, 2017 · 1 comment
Open

Integration with normal RxJs streams #21

baldassarreFe opened this issue Mar 14, 2017 · 1 comment

Comments

@baldassarreFe
Copy link

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?

@QuentinRoy
Copy link

If you are using rxjs5, it is not compatible with this library.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants