Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mastilver/rx-bundle-last
https://github.com/mastilver/rx-bundle-last
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mastilver/rx-bundle-last
- Owner: mastilver
- License: mit
- Created: 2015-08-19T21:57:28.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-23T13:02:23.000Z (almost 8 years ago)
- Last Synced: 2024-04-24T01:43:11.386Z (7 months 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 [![Build Status](https://travis-ci.org/mastilver/rx-bundle-last.svg?branch=master)](https://travis-ci.org/mastilver/rx-bundle-last)[![Coverage Status](https://coveralls.io/repos/mastilver/rx-bundle-last/badge.svg?branch=master&service=github)](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: minThe maximum size the emitted array will be
## License
MIT © [Thomas Sileghem](https://github.com/mastilver)