rx-bundle-last
v1.1.0
Published
Emit an array of the latest emitted value
Downloads
5
Readme
rx-bundle-last
Emit an array of the latest emitted value
Install
$ npm install --save rx-bundle-last
Usage
var rxBundleLast = require('rx-bundle-last');
var source = getData(); // get an Observable
var bundledSource = rxBundleLast(source, 5);
bundledSource.forEach(function(array){
assert.equal(array.length, 5);
});
API
rxBundleLast(source, min, [max])
source
Required
Type: Observable
From which the bundled source is created
min
Required
Type: int
The minimum size the emitted array will be
max
Type: int
Default: min
The maximum size the emitted array will be
License
MIT © Thomas Sileghem