Skip to content
This repository was archived by the owner on Oct 1, 2018. It is now read-only.

Commit 65c2aef

Browse files
ashwin-sureshkumarsumitarora
authored andcommitted
docs(operators): add documentation for skipWhile (#234)
Close #99
1 parent e35106b commit 65c2aef

File tree

1 file changed

+56
-2
lines changed

1 file changed

+56
-2
lines changed
Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,60 @@
11
import { OperatorDoc } from '../operator.model';
22

33
export const skipWhile: OperatorDoc = {
4-
'name': 'skipWhile',
5-
'operatorType': 'filtering'
4+
name: 'skipWhile',
5+
operatorType: 'filtering',
6+
signature: `
7+
public skipWhile(predicate: Function): Observable
8+
`,
9+
parameters: [
10+
{
11+
name: 'predicate',
12+
type: 'Function',
13+
attribute: '',
14+
description: `A function to test each item emitted from the source Observable.`
15+
}
16+
],
17+
marbleUrl: 'http://reactivex.io/rxjs/img/skipWhile.png',
18+
shortDescription: {
19+
description: `
20+
Returns an Observable that skips all items emitted by the source Observable
21+
as long as a specified condition holds true, but emits all further source items as soon as the condition becomes false.
22+
`
23+
},
24+
examples: [
25+
{
26+
name: '',
27+
code: `
28+
import { range } from 'rxjs/observable/range';
29+
import { skipWhile } from 'rxjs/operators';
30+
31+
const source = range(1, 20);
32+
// skips all values until the first divisible by 7, then emit all values from then on
33+
const example = source.pipe(
34+
skipWhile(val => val % 7 !== 0)
35+
);
36+
const subscribe = example.subscribe(val => console.log(val));
37+
38+
// Ouput
39+
7
40+
8
41+
9
42+
10
43+
11
44+
12
45+
13
46+
14
47+
15
48+
16
49+
17
50+
18
51+
19
52+
20
53+
`,
54+
externalLink: {
55+
platform: 'JSBin',
56+
url: 'http://jsbin.com/qupucehelo/embed?js,console,output'
57+
}
58+
}
59+
]
660
};

0 commit comments

Comments
 (0)