Sha256: b1dea19b2e7e222d938066265897800ce685981069ce67d7f566d06294b4cc70
Contents?: true
Size: 601 Bytes
Versions: 14
Compression:
Stored size: 601 Bytes
Contents
/** * Creates an array from an observable sequence. * @returns {Observable} An observable sequence containing a single element with a list containing all the elements of the source sequence. */ observableProto.toArray = function () { var source = this; return new AnonymousObservable(function(observer) { var arr = []; return source.subscribe( function (x) { arr.push(x); }, function (e) { observer.onError(e); }, function () { observer.onNext(arr); observer.onCompleted(); }); }, source); };
Version data entries
14 entries across 7 versions & 1 rubygems