Wrap

wrap() allows you to turn any RxJS observable into a pin and use it in your reactive flows:
  /*!*/import { wrap, map, group } from '@connectv/core';
import { interval, fromEvent } from 'rxjs';

group(
/*!*/  wrap(interval(1000)),
/*!*/  wrap(fromEvent(document, 'click'))
)
.to(map(v => 'GOT:: ' + v))
.subscribe(console.log);
Wrap is a (special kind of) Pin and so inherits a lot of its properties and behaviors, though connecting another pin to it is prohibited.

Further reading




Copied to Clipboard!