Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
parallel-write-stream
Advanced tools
Parallel Write Stream is an abstract class which helps create kind of passthrough stream. Regardless of how data will flow into your writable stream, the batch of tasks will be processed in parallel.
Parallel Write Stream is an abstract class which helps create kind of passthrough stream.
Your have to implement _save
method and operate with the object streams only.
Regardless of how data will flow into your writable stream, the batch of tasks will be processed in parallel.
$ npm install --save parallel-write-stream
To implement parallel write stream, follow the pattern:
var util = require('util');
var ParallelWriteStream = require('parallel-write-stream');
var Updater = function () {
ParallelWriteStream.call(this);
};
util.inherits(Updater, ParallelWriteStream);
Updater.prototype._save = function (doc, callback) {
// implement procedure to save doc here
// invoke callback then save will be done
callback();
};
The size of the batch is specified in the options passed to constructor.
var update = new Updater({
concurrency: 5
});
The document you want to store, update or process in other way.
A function which is called when the processing is finished. First argument is the error.
MIT © 2015 Vladimir Kuznetsov
FAQs
Parallel Write Stream is an abstract class which helps create kind of passthrough stream. Regardless of how data will flow into your writable stream, the batch of tasks will be processed in parallel.
We found that parallel-write-stream demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.