requestAnimationFrame based stream throttler
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.babelrc
.eslintrc
.gitignore
.npmignore
.travis.yml
LICENSE.md
README.md
README.template.hbs
package.json

README.md

rx-raf-throttle

Build Status npm Coverage Status Donate Bitcoin

throttles rx based streams using requestAnimationFrame

Installation

npm install rx-raf-throttle --save

rxRAFThrottle(source) ⇒ Observable

Throttles a stream using requestAnimationFrame. A value from the source stream is fired only once per requestAnimationFrame, see demo.

Kind: global function

Param Type
source Observable

Example

import {rxRAFThrottle} from 'rx-raf-throttle'
rxRAFThrottle(Rx.Observable.interval(1)).subscribe(x => console.log(x))