javascript - RxJS - Emit value after ever n received -


does there exist operator enables emissions throttled count?

i want repeat skip call. in example below skip 5, emit value , repeat.

export default function errorhandler(action$){   action$.oftype(types.error)   /* after every n emissions received, emit once */   .map(someaction) } 

you use buffercount, emit once has buffered specified number of actions.

with rxjs's terminology, throttling involve first of buffered actions being emitted:

export default function errorhandler(action$){   action$.oftype(types.error)     .buffercount(5)     .map((actions) => actions[0]); } 

emitting last buffered action instead referred debouncing, in rxjs's terminology:

export default function errorhandler(action$){   action$.oftype(types.error)     .buffercount(5)     .map((actions) => actions[actions.length - 1]); } 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -