Sha256: 4e332974babedd95862e875e2af0e57264ef65e052339815d630c62f410ea084
Contents?: true
Size: 711 Bytes
Versions: 14
Compression:
Stored size: 711 Bytes
Contents
/** * Propagates the observable sequence or Promise that reacts first. * * @example * var = Rx.Observable.amb(xs, ys, zs); * @returns {Observable} An observable sequence that surfaces any of the given sequences, whichever reacted first. */ Observable.amb = function () { var acc = observableNever(), items = []; if (Array.isArray(arguments[0])) { items = arguments[0]; } else { for(var i = 0, len = arguments.length; i < len; i++) { items.push(arguments[i]); } } function func(previous, current) { return previous.amb(current); } for (var i = 0, len = items.length; i < len; i++) { acc = func(acc, items[i]); } return acc; };
Version data entries
14 entries across 7 versions & 1 rubygems