Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pause-stream

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pause-stream

a ThroughStream that strictly buffers all readable events when paused.

  • 0.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is pause-stream?

The pause-stream package is a Node.js module that allows you to pause and resume streaming data. It is particularly useful in scenarios where you need to control the flow of data, for example, when processing or transforming data in chunks. It provides a simple API to pause the data stream, process the current chunk of data, and then resume the stream when ready.

What are pause-stream's main functionalities?

Pausing and resuming a stream

This feature allows you to pause the flow of data in a stream and then resume it. The code sample demonstrates how to create a readable stream from a file, pipe it through a pause-stream, pause the stream to process data, and then resume the stream.

"use strict";
const pause = require('pause-stream')();
const fs = require('fs');

let dataStream = fs.createReadStream('data.txt');
dataStream.pipe(pause);

pause.pause();
// Process data here
pause.resume();

Other packages similar to pause-stream

Keywords

FAQs

Package last updated on 20 Sep 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc