docs: function collect(stream, encoding, cb = () => {}) {
    if (typeof encoding === 'function') {
      cb = encoding;
      encoding = null;
    }
  
    return stream
      .pipe(new Collect({ encoding, objectMode: stream._readableState.objectMode }))
      .collect()
      .then((data) => {
        cb(null, data);
        return data;
      })
      .catch((e) => {
        cb(e);
        throw e;
      });
  }