Sha256: 22d9338d6beb7daa299d19ad9fff45bce4c06cb1cab6efd59213c24a501c381e
Contents?: true
Size: 627 Bytes
Versions: 14
Compression:
Stored size: 627 Bytes
Contents
/** * Converts the observable sequence to a Set if it exists. * @returns {Observable} An observable sequence with a single value of a Set containing the values from the observable sequence. */ observableProto.toSet = function () { if (typeof root.Set === 'undefined') { throw new TypeError(); } var source = this; return new AnonymousObservable(function (o) { var s = new root.Set(); return source.subscribe( function (x) { s.add(x); }, function (e) { o.onError(e); }, function () { o.onNext(s); o.onCompleted(); }); }, source); };
Version data entries
14 entries across 7 versions & 1 rubygems