View mapping-subject.js
1 2 3 4 5 6 7 8 9 10
// Create a single subject for all emitting of data
var subject = new Rx.Subject();
 
// Create something just for mapping
var obs = subject.map(function(message) {
return message + ' dawg.';
});
 
// Subscribe to that
obs.subscribe(function(message) {console.log(message);});
View asyncobservable.ts
1 2 3 4 5 6 7 8 9 10
interface Disposable {
dispose(): void
}
interface AsyncObservable<T> {
subscribe(observer: AsyncObserver<T>) : Disposable
// OR
forEach(observer: AsyncObserver<T>) : Disposable
}
View observable.ts
1 2 3 4 5 6 7 8 9
interface Disposable {
dispose(): void
}
 
interface Observable<T> {
subscribe(observer: Observer<T>) : Disposable
// OR
forEach(observer: Observer<T>) : Disposable
}
View stooges.md
Sending Request…

Picking out some quotes to form a new language from Three Stooges WikiQuote inspired by Avail

  • Hello, Hello, Hello! Hello. - Main
  • Spread Out! - Process Fork
  • Soitenly! - True
  • Nyah - False
  • Why I Otta - Throw Error
  • This is all your fault you - Catch Error
  • I'm trying to think but nothing happens - Out of Memory Error
  • Nyuk Nyuk Nyuk - Return
View pluck.js
1 2 3 4 5 6 7 8 9 10
/**
* Retrieves the value of a specified nested property from all elements in
* the Observable sequence.
* @param {Arguments} arguments The nested properties to pluck.
* @returns {Observable} Returns a new Observable sequence of property values.
*/
observableProto.pluck = function () {
var args = arguments, len = arguments.length;
if (len === 0) { throw new Error('List of properties cannot be empty.'); }
return this.map(function (x) {
View selectmany.js
1 2 3 4 5 6 7 8 9 10
function flatMap(source, selector, thisArg) {
var selectorFn = isFunction(selector) ? bindCallback(selector, thisArg, 3) : function () { return selector; };
return new AnonymousObservable(function(observer) {
var sad = new SingleAssignmentDisposable();
var g = new CompositeDisposable();
g.add(sad);
var isStopped = false;
var i = 0;
sad.setDisposable(source.subscribe(
function (value) {
View combinelatest.js
1 2 3 4 5 6 7 8 9 10
/**
* Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences or Promises produces an element.
* This can be in the form of an argument list of observables or an array.
*
* @example
* 1 - obs = observable.combineLatest(obs1, obs2, obs3, function (o1, o2, o3) { return o1 + o2 + o3; });
* 2 - obs = observable.combineLatest([obs1, obs2, obs3], function (o1, o2, o3) { return o1 + o2 + o3; });
* @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
observableProto.combineLatest = function () {
View CompositeDisposable.js
1 2 3 4 5 6 7 8 9 10
/**
* Represents a group of disposable resources that are disposed together.
* @constructor
*/
var CompositeDisposable = Rx.CompositeDisposable = function () {
var disposables = [];
if (Array.isArray(arguments[0])) {
disposables = arguments[0];
} else {
for(var i = 0, len = arguments.length; i < len; i++) { disposables.push(arguments[i]); }
View foo.js
1 2 3 4 5 6 7 8 9 10
// Using anon functions
var source = self;
return new AnonymousObservable(function (o) {
return source.subscribe(
function (x) { o.onNext(x); },
function (e) { o.onError(e); },
function () { o.onCompleted(); })
});
 
// Using binders
View defer-concat.cs
1 2 3 4 5 6 7 8 9 10
var parents = new[]
{
new
{
name = "stu",
children = new[]
{
new {name = "john"},
new {name = "audrey"},
new {name = "eustace"}
Something went wrong with that request. Please try again.