Bundled output for commit 87b60d19dc [skip ci]
This commit is contained in:
parent
87b60d19dc
commit
5584abde1d
2 changed files with 44 additions and 42 deletions
|
|
@ -699,6 +699,7 @@ var StreamFactory = function(log) {
|
|||
return initDependency(self, [stream], derive, recover)
|
||||
}
|
||||
function combine(fn, streams) {
|
||||
if (streams.length > streams.filter(valid).length) throw new Error("Ensure that each item passed to m.prop.combine/m.prop.merge is a stream")
|
||||
return initDependency(createStream(), streams, function() {
|
||||
var failed = streams.filter(errored)
|
||||
if (failed.length > 0) throw {__error: failed[0]._state.error}
|
||||
|
|
@ -755,6 +756,7 @@ var StreamFactory = function(log) {
|
|||
function ap(stream) {return combine(function(s1, s2) {return s1()(s2())}, [this, stream])}
|
||||
function valueOf() {return this._state.value}
|
||||
function toJSON() {return this._state.value != null && typeof this._state.value.toJSON === "function" ? this._state.value.toJSON() : this._state.value}
|
||||
function valid(stream) {return stream._state }
|
||||
function active(stream) {return stream._state.state === 1}
|
||||
function changed(stream) {return stream._state.changed}
|
||||
function notEnded(stream) {return stream._state.state !== 2}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue