Skip to content

Instantly share code, notes, and snippets.

View travenasty's full-sized avatar

Travis Barney travenasty

View GitHub Profile
@travenasty
travenasty / xstream-endwhen-merge.js
Created September 17, 2016 05:36
Question about the nature of a merged stream used within an .endWhen
const orbRelease$ = xs.merge(
domCube.events('mouseout').filter(
ev => ev.target.classList.contains('au-cube')
),
domCube.events('mouseup'),
domCube.events('touchend')
).debug(log.pass)
const spin$ = dotTap$.map(tap => point$.endWhen(
// ONLY EMITS ONCE AND COMPLETES, UNLESS xs.merge IS INLINE HERE IT WILL REMAIN INCOMPLETE AND CONTINUE EMITTING
/// <reference path="../../typings/angular2/angular2.d.ts" />
import {Component, View, NgIf, ElementRef} from 'angular2/angular2';
import {Inject} from 'angular2/di';
@Component({
selector: 'foo-component',
injectables: [ElementRef]
})
@View({