View retryWhen.js
'use strict';
const Observable = require('./observable');
Observable.addToObject({
just: require('./observable/just')
});
Observable.addToPrototype({
delay: require('./observable/delay'),
View pique.js
'use strict';
var LocalPromise = global.Promise;
/** @module Pique */
/**
* @classdesc Creates a queue of functions that are guaranteed to be run
* exactly once and in serial FIFO order. So that the first enqueue function
* will complete before the second is executed.
View failwhen.js
function noop() { }
Observable.prototype.failWhen = other => {
var source = this;
return Observable.create(o => {
var isHit = false;
return new NAryDisposable(
source.subscribe(
x => {
if (isHit) {
View buildfailed.txt
Executing "before_build" hook for all plugins.
Executing "before_prepare" hook for all plugins.
Searching PlatformJson files for differences between project vs. platform installed plugins
No differences found between project and ios platform. Continuing...
Generating config.xml from defaults for platform "ios"
Wrote out iOS Bundle Identifier to "com.podwysocki.testproject"
Wrote out iOS Bundle Version to "0.0.1"
iOS Product Name has not changed (still "TestProject")
updated project successfully
Executing "after_prepare" hook for all plugins.
View fromevent.js
function fromEvent(target, fn) {
return Observable.create(o => {
const handler = e => o.onNext(e);
target.addEventListener(fn, false);
return () => target.removeEventListener(fn, false);
});
}
View qotd.md

It's people like that who make you realize how little you've accomplished. It is a sobering thought, for example, that when Mozart was my age, he had been dead for two years.

  • Tom Lehrer
View example.js
manager._emitter.on('peerAvailabilityChanged', function (peers) {
io.emit('peerAvailabilityChanged', peers);
});
manager._emitter.on('networkChanged', function (isAvailable) {
io.emit('peerAvailabilityChanged', isAvailable);
});
View tap.js
const noop = () => { };
const throwError = (e) => { throw e; };
Observable.prototype.interceptOnNext = (onNext, thisArg) => {
const source = this;
return Observable.create(o => {
let i = 0;
return source.subscribe(
x => {
try {
View zip.cs
Observable.Zip(
Observable.Interval(TimeSpan.FromTicks(100)).Take(3),
Observable.Interval(TimeSpan.FromTicks(100)).Take(4),
Observable.Interval(TimeSpan.FromTicks(100)).Do(x => Console.WriteLine("third")),
Observable.Interval(TimeSpan.FromTicks(100)).Do(x => Console.WriteLine("fourth"))
).Subscribe(xs => { foreach (var x in xs) { Console.Write(x); } }, () => Console.WriteLine("done"));
Console.ReadLine();
View async.js
var source = Rx.Observable.fromArray([1,2,3])
.flatMap(async function (x, i) {
var result = await Promise.resolve(x * i);
return result;
});
source.subscribe(function (x) { console.log(x); });