Sha256: afc72a3ec90ec08b3ef05e438a62266095cde4f15661e1c47250b25796674e41
Contents?: true
Size: 462 Bytes
Versions: 14
Compression:
Stored size: 462 Bytes
Contents
function firstOrDefaultAsync(source, hasDefault, defaultValue) { return new AnonymousObservable(function (o) { return source.subscribe(function (x) { o.onNext(x); o.onCompleted(); }, function (e) { o.onError(e); }, function () { if (!hasDefault) { o.onError(new EmptyError()); } else { o.onNext(defaultValue); o.onCompleted(); } }); }, source); }
Version data entries
14 entries across 7 versions & 1 rubygems