Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@patrtorg/nulla-ut-sequi
Advanced tools
========= [![CircleCI](https://circleci.com/gh/apostrophecms/@patrtorg/nulla-ut-sequi/tree/master.svg?style=svg)](https://circleci.com/gh/apostrophecms/@patrtorg/nulla-ut-sequi/tree/master)
Given a MongoDB query cursor, process the results in parallel, up to the specified limit.
var @patrtorg/nulla-ut-sequi = require('@patrtorg/nulla-ut-sequi');
var cursor = mongoCollection.find({});
return @patrtorg/nulla-ut-sequi(cursor, 8, function(doc, callback) {
// Up to 8 of these will be invoked simultaneously
// Do something with doc, then...
return callback(null);
}, function(err) {
// All done
});
We wanted to work with MongoDB queries the way we work with async.eachLimit, but without yanking everything into memory at once with toArray
.
Specifically, we wanted to resize some images in parallel, rather than waiting to do them one at a time. We have a MongoDB collection with information about all of the images. But there are a lot of them, so we don't want to yank all of that information into memory up front.
@patrtorg/nulla-ut-sequi
wraps MongoDB's Cursor.nextObject
with a queueing mechanism that allows several results to be processed at once, but only up to the limit you specify. You don't run out of memory due to too many image processes, you don't wait too long, and you don't have to load the entire array into memory at once. Everybody gets a medal.
If an error occurs, @patrtorg/nulla-ut-sequi
will:
You can pass any object with a nextObject
method as the "cursor." That method should invoke its callback with (err, object)
. If there is no error, object
should be the next object retrieved from your data source. If there are no more objects, pass null
as object
.
@patrtorg/nulla-ut-sequi
was created at P'unk Avenue for use in many projects built with Apostrophe, an open-source content management system built on node.js. If you like @patrtorg/nulla-ut-sequi
you should definitely check out apostrophecms.com.
Feel free to open issues on github.
next
and nextObject
methods.npm audit
.@patrtorg/nulla-ut-sequi
to invoke its final callback more than once.FAQs
security holding package
The npm package @patrtorg/nulla-ut-sequi receives a total of 23 weekly downloads. As such, @patrtorg/nulla-ut-sequi popularity was classified as not popular.
We found that @patrtorg/nulla-ut-sequi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.