Rewrite stream (#2207)
* Rewrite stream * Rename HALT to SKIP * Rename HALT to SKIP * Remove valueOf and toString * Update docs for HALT to SKIP * Rename halt to skip in test * Add test for combining nested streams atomically * Update change-log.md * Test basic SKIP * Add deprecated HALT * Combine continues with ended streams * Fix fantasy-land/of to match spec * Don't use arrow function * Improve scan description * Fix merge artifact
This commit is contained in:
parent
5e7528fefd
commit
58c86f7546
5 changed files with 214 additions and 159 deletions
|
|
@ -31,7 +31,7 @@ o.spec("scan", function() {
|
|||
o(result[3]).deepEquals({a: 1})
|
||||
})
|
||||
|
||||
o("reducer can return HALT to prevent child updates", function() {
|
||||
o("reducer can return SKIP to prevent child updates", function() {
|
||||
var count = 0
|
||||
var action = stream()
|
||||
var store = stream.scan(function (arr, value) {
|
||||
|
|
@ -39,7 +39,7 @@ o.spec("scan", function() {
|
|||
case "number":
|
||||
return arr.concat(value)
|
||||
default:
|
||||
return stream.HALT
|
||||
return stream.SKIP
|
||||
}
|
||||
}, [], action)
|
||||
var child = store.map(function (p) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue