Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/node/stream.ts>Readable#resume

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
method Readable.prototype.resume
Re-export
import { Readable } from "https://deno.land/std@0.159.0/node/stream.ts";

The readable.resume() method causes an explicitly paused Readable stream to resume emitting 'data' events, switching the stream into flowing mode.

The readable.resume() method can be used to fully consume the data from a stream without actually processing any of that data:

getReadableStreamSomehow()
  .resume()
  .on('end', () => {
    console.log('Reached the end, but did not read anything.');
  });

The readable.resume() method has no effect if there is a 'readable'event listener.