stream is passed as the argument to <code>JSON.stringify()</code>, the value of the stream is serialized.</p>
<pre><code class="lang-javascript">var value = stream(123)
var serialized = JSON.stringify(value)
console.log(serialized) // logs 123
</code></pre>
<p>Streams also implement a <code>valueOf</code> method that returns the value of the stream.</p>
<pre><code class="lang-javascript">var value = stream(123)
console.log(&quot;test &quot; + value) // logs &quot;test 123&quot;
</code></pre>
<hr>
<h3 id="st