code: async function* streamToGenerator(stream) {
    let promise;
  
    stream.on('data', data => promise.resolve(data));
    stream.once('end', () => promise.resolve(null));
  
    stream.on('error', error => {
      stream.removeAllListeners();
      promise.reject(error);
    });
  
    while (true) {
      promise = defer();
  
      yield promise;
    }
  }
docs: Reads values from a object mode readable stream as an async iterator.
  @param  {Stream.Readable} stream - A value stream from levelup.
  @return {Promise<Object>} - Resolves with each node.