code: function createParseStream() {
  
      // when the parse stream gets chunks of data, it is an object with key/val
      // fields. accumulate the parsed fields.
      const accumulator = {};
      const parseStream = JSONStream.parse('$*');
      const wrapperStream = through2.obj(
          function write(chunk, enc, cb) {
              parseStream.write(chunk);
              return cb();
          },
          function flush(cb) {
              parseStream.on('end', function() {
                  return cb(null, accumulator);
              });
              parseStream.end();
          }
      );
  
      // for each chunk parsed, add it to the accumulator
      parseStream.on('data', function(chunk) {
          accumulator[chunk.key] = chunk.value;
      });
  
      // make sure error is forwarded on to wrapper stream.
      parseStream.on('error', function(err) {
          wrapperStream.emit('error', err);
      });
  
      return wrapperStream;
  }
docs: Create a JSON.parse that uses a stream interface. The underlying
  implementation is handled by JSONStream. This is merely a thin wrapper for
  convenience that handles the reconstruction/accumulation of each
  individually parsed field.
  
  The advantage of this approach is that by also using a streams interface,
  any JSON parsing or stringification of large objects won't block the CPU.
  @public
  @function createParseStream
  @return {Stream}