https://github.com/mastilver/rx-bundle-last
https://github.com/mastilver/rx-bundle-last
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/mastilver/rx-bundle-last
- Owner: mastilver
- License: mit
- Created: 2015-08-19T21:57:28.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-12-23T13:02:23.000Z (over 9 years ago)
- Last Synced: 2024-12-19T15:03:31.928Z (over 1 year ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# rx-bundle-last [](https://travis-ci.org/mastilver/rx-bundle-last)[](https://coveralls.io/github/mastilver/rx-bundle-last?branch=master)
> Emit an array of the latest emitted value
## Install
```
$ npm install --save rx-bundle-last
```
## Usage
```js
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](https://github.com/mastilver)