rx-bundle-last

Emit an array of the latest emitted value

Usage no npm install needed!

<script type="module">
  import rxBundleLast from 'https://cdn.skypack.dev/rx-bundle-last';
</script>

README

rx-bundle-last Build StatusCoverage Status

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