From 3d02aeae368408d595fcf23e7d10e623c97ac6e4 Mon Sep 17 00:00:00 2001 From: Barney Carroll Date: Thu, 14 Jul 2016 13:19:31 +0100 Subject: [PATCH] prop.toString method --- util/stream.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/util/stream.js b/util/stream.js index 1897f72b..3abffcc8 100644 --- a/util/stream.js +++ b/util/stream.js @@ -7,18 +7,18 @@ function createStream() { return stream._state.value } initStream(stream, arguments) - + if (arguments.length > 0) updateStream(stream, arguments[0], undefined) - + return stream } function initStream(stream, args) { stream.constructor = createStream stream._state = {id: guid++, value: undefined, error: undefined, state: 0, derive: undefined, recover: undefined, deps: {}, parents: [], errorStream: undefined, endStream: undefined} stream.map = map, stream.ap = ap, stream.of = createStream - stream.valueOf = valueOf, stream.toJSON = toJSON + stream.valueOf = valueOf, stream.toJSON = toJSON, stream.toString = valueOf stream.run = run, stream.catch = doCatch - + Object.defineProperties(stream, { error: {get: function() { if (!stream._state.errorStream) { @@ -132,10 +132,10 @@ function initDependency(dep, streams, derive, recover) { state.derive = derive state.recover = recover state.parents = streams.filter(notEnded) - + registerDependency(dep, state.parents) updateDependency(dep, true) - + return dep } function registerDependency(stream, parents) {