Sha256: 54a87b1b873698b03bff24211593d18c826c3b70891a925996ce40ab2f86774f
Contents?: true
Size: 830 Bytes
Versions: 14
Compression:
Stored size: 830 Bytes
Contents
/** * Bypasses a specified number of elements in an observable sequence and then returns the remaining elements. * @param {Number} count The number of elements to skip before returning the remaining elements. * @returns {Observable} An observable sequence that contains the elements that occur after the specified index in the input sequence. */ observableProto.skip = function (count) { if (count < 0) { throw new ArgumentOutOfRangeError(); } var source = this; return new AnonymousObservable(function (o) { var remaining = count; return source.subscribe(function (x) { if (remaining <= 0) { o.onNext(x); } else { remaining--; } }, function (e) { o.onError(e); }, function () { o.onCompleted(); }); }, source); };
Version data entries
14 entries across 7 versions & 1 rubygems