nodejs-bigtable icon indicating copy to clipboard operation
nodejs-bigtable copied to clipboard

Consider migrating from pumpify to pipeline or to Readable.from

Open leahecole opened this issue 5 months ago • 0 comments

The pumpify library for streams can be a bit flaky. Recommending that when someone has time, to consider using pipeline or Readable.from instead.

Readable.from example:

async function* concatStreams(streams: ReadableStream[]) {
  for (const stream of streams) {
    yield* stream;
  }
}

const readable = Readable.from(concatStreams());

(Original comment from a thread in a gax PR https://github.com/googleapis/gax-nodejs/pull/1653#discussion_r1764032623)

leahecole avatar Sep 24 '24 13:09 leahecole