Sha256: b6cdb284e814c9df7b5959e9f02aadd1086dca67dbc9e986eedb497c8f6607b5
Contents?: true
Size: 1010 Bytes
Versions: 14
Compression:
Stored size: 1010 Bytes
Contents
/** * Bypasses a specified number of elements at the end of an observable sequence. * @description * This operator accumulates a queue with a length enough to store the first `count` elements. As more elements are * received, elements are taken from the front of the queue and produced on the result sequence. This causes elements to be delayed. * @param count Number of elements to bypass at the end of the source sequence. * @returns {Observable} An observable sequence containing the source sequence elements except for the bypassed ones at the end. */ observableProto.skipLast = function (count) { if (count < 0) { throw new ArgumentOutOfRangeError(); } var source = this; return new AnonymousObservable(function (o) { var q = []; return source.subscribe(function (x) { q.push(x); q.length > count && o.onNext(q.shift()); }, function (e) { o.onError(e); }, function () { o.onCompleted(); }); }, source); };
Version data entries
14 entries across 7 versions & 1 rubygems