Skip to content

Commit e8cba06

Browse files
authored
Merge pull request #17 from maniator/scan-reduce
add docs for scan and reduce
2 parents 698b182 + f6b89b1 commit e8cba06

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/operators/DOCUMENTATION.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ These methods called by doing: `observableInstance$.<pluginFunction>`
2020
`.first([<callback>])`
2121

2222
- this is an alias for `.take(1[, <callback>])`
23+
24+
`.scan(scanCallback[, startValue])`
25+
26+
- will go through each value in array and will increase the value based off the return of the scanCallback
27+
- there is an optional `startValue` which by default is 0
28+
29+
`.reduce(scanCallback[, startValue])`
30+
31+
- does the same as `.scan` but only returns when the chained observable is complete and not on every new value
2332

2433
`.toPromise()`
2534

0 commit comments

Comments
 (0)