Sha256: 95c2910fa44ba6c8708b4a3557d2acc51e898d542f05492555c7a873722e65d8
Contents?: true
Size: 680 Bytes
Versions: 14
Compression:
Stored size: 680 Bytes
Contents
function findValue (source, predicate, thisArg, yieldIndex) { var callback = bindCallback(predicate, thisArg, 3); return new AnonymousObservable(function (o) { var i = 0; return source.subscribe(function (x) { var shouldRun; try { shouldRun = callback(x, i, source); } catch (e) { o.onError(e); return; } if (shouldRun) { o.onNext(yieldIndex ? i : x); o.onCompleted(); } else { i++; } }, function (e) { o.onError(e); }, function () { o.onNext(yieldIndex ? -1 : undefined); o.onCompleted(); }); }, source); }
Version data entries
14 entries across 7 versions & 1 rubygems