New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

parallel-transform

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

parallel-transform

Transform stream that allows you to run your transforms in parallel without changing the order

1.2.0
latest
Source
npm
Version published
Weekly downloads
3.5M
-25.71%
Maintainers
1
Weekly downloads
 
Created

What is parallel-transform?

The parallel-transform npm package is a Node.js module that allows you to perform parallel transformations on streams of data. It is particularly useful when you need to process data in a stream without overloading the system with too many concurrent operations. It maintains the order of the stream and allows you to specify the maximum number of concurrent transformations.

What are parallel-transform's main functionalities?

Parallel Stream Transformation

This feature allows you to create a transform stream that can process data in parallel. The code sample shows how to create a parallel transform stream that converts input data to uppercase with a maximum of 10 concurrent operations.

const ParallelTransform = require('parallel-transform');
const stream = require('stream');

const parallelStream = new ParallelTransform(10, function(data, callback) {
  // Perform some asynchronous operation
  setTimeout(() => {
    callback(null, data.toString().toUpperCase());
  }, 100);
});

process.stdin.pipe(parallelStream).pipe(process.stdout);

Other packages similar to parallel-transform

Keywords

transform

FAQs

Package last updated on 05 Sep 2019

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