code: function readStream(stream) {
    return new Promise(function(resolve) {
      stream.pipe(concat(function(data) {
        resolve(data.toString().trim());
      }));
    });
  }
docs: Reads an stream
  
  @private
  @param {Stream} stream
  @returns {Promise} resolves with the value