@@ -43,15 +43,16 @@ export const bufferTime: OperatorDoc = {
4343 } ,
4444 walkthrough : {
4545 description : `
46- Buffers values from the source for a specific time duration <code>bufferTimeSpan</code>.
47- It emits and resets the buffer every <code>bufferTimeSpan</code> milliseconds,
48- unless the optional argument <code>bufferCreationInterval</code> is given.
49- If <code>bufferCreationInterval</code> is given,
50- this operator emits the buffered values and re-opens the buffer every <code>bufferCreationInterval</code> milliseconds
51- and closes (no further values are buffered) the buffer every <code>bufferTimeSpan</code> milliseconds.
52- When the optional argument <code>maxBufferSize</code> is specified,
53- the buffer will be closed either after <code>bufferTimeSpan</code> milliseconds
54- or when it contains <code>maxBufferSize</code> elements.`
46+ Buffers values from the source for a specific time duration <span class="markdown-code">bufferTimeSpan</span>.
47+ It emits and resets the buffer every <span class="markdown-code">bufferTimeSpan</span> milliseconds,
48+ unless the optional argument <span class="markdown-code">bufferCreationInterval</span> is given.
49+ If <span class="markdown-code">bufferCreationInterval</span> is given,
50+ this operator emits the buffered values and re-opens the buffer every <span class="markdown-code">bufferCreationInterval</span>
51+ milliseconds and closes (no further values are buffered) the buffer every
52+ <span class="markdown-code">bufferTimeSpan</span> milliseconds.
53+ When the optional argument <span class="markdown-code">maxBufferSize</span> is specified,
54+ the buffer will be closed either after <span class="markdown-code">bufferTimeSpan</span> milliseconds
55+ or when it contains <span class="markdown-code">maxBufferSize</span> elements.`
5556 } ,
5657 examples : [
5758 {
@@ -63,13 +64,14 @@ import { map, bufferTime } from 'rxjs/operators';
6364
6465const clicks = fromEvent(document, 'click');
6566const buffered = clicks.pipe(
67+ map(e => { return {x: e.clientX, y: e.clientY}; }),
6668 bufferTime(2500)
6769);
6870buffered.subscribe(x => console.log(x));
6971 ` ,
7072 externalLink : {
7173 platform : 'JSBin' ,
72- url : 'http://jsbin.com/fuqewiy/1 /embed?js,console,output'
74+ url : 'http://jsbin.com/fuqewiy/3 /embed?js,console,output'
7375 }
7476 } ,
7577 {
@@ -81,13 +83,14 @@ buffered.subscribe(x => console.log(x));
8183
8284 const clicks = fromEvent(document, 'click');
8385 const buffered = clicks.pipe(
86+ map(e => { return {x: e.clientX, y: e.clientY}; }),
8487 bufferTime(2000, 5000)
8588 );
8689 buffered.subscribe(x => console.log(x));
8790` ,
8891 externalLink : {
8992 platform : 'JSBin' ,
90- url : 'http://jsbin.com/xohupot/embed?js,console,output'
93+ url : 'http://jsbin.com/xohupot/1/ embed?js,console,output'
9194 }
9295 }
9396 ] ,
0 commit comments