标签: javascript timeout buffer rxjs observable
我正在使用rxjs 5.0:
如何在此缓冲区上设置超时。这样当5秒内没有键盘事件发生时它会清除bufferCount(11)吗?
var keys = Rx.Observable.fromEvent(document, 'keyup'); var buffered = keys.bufferCount(11,1); buffered.subscribe(x => console.log(x));