Node.js: can you use asynchronous functions from within streams?
<p>Consider the following:</p>

<pre><code>var asyncFunction = function(data, callback) {
  doAsyncyThing(function(data){
    // do some stuff
    return callback(err)
  })
}
fs.createReadStream('eupmc_lite_metadata_2016_04_15.json')
  .pipe(JSONstream.parse())
  .on('data', asyncFunction)   // &lt;- how to let asyncFunction complete before continuing
</code></pre>

<p>How does the stream know when asyncFunction has completed? Is there any way to use asynchronous functions from within streams?</p>