Skip to content

Latest commit

 

History

History
56 lines (43 loc) · 1.91 KB

takelastbuffer.md

File metadata and controls

56 lines (43 loc) · 1.91 KB

Rx.Observable.prototype.takeLastBuffer(count)

Returns an array with the specified number of contiguous elements from the end of an observable sequence.

Arguments

  1. count (Number): Number of elements to bypass at the end of the source sequence.

Returns

(Observable): An observable sequence containing a single array with the specified number of elements from the end of the source sequence.

Example

var source = Rx.Observable.range(0, 5)
    .takeLastBuffer(3);

var subscription = source.subscribe(
    function (x) {
        console.log('Next: ' + x);
    },
    function (err) {
        console.log('Error: ' + err);
    },
    function () {
        console.log('Completed');
    });

// => Next: 2,3,4
// => Completed

Location

File:

Dist:

Prerequisites:

  • None

NPM Packages:

NuGet Packages:

Unit Tests: