
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
collect-transform-stream
Advanced tools
create a transform stream that runs a function over all collected elements
create a transform stream that runs a function over all collected elements
Sometimes you end up in a situation where you have a stream pipeline like
pump(source, transform, destination)
but you have another transform function that needs to process all elements in the stream before passing them on, e.g. filtering duplicates from an unordered stream:
pump(source, collectAndFilter, transform, destination)
collect-transform-stream
is a tiny module that provides this.
var collect = require('collect-transform-stream')
var uniq = require('uniq')
var from = require('from2')
var source = from.obj(new Array(100).fill(0).map(function () {
return Math.floor(Math.random() * 10)
}))
var dedupe = collect(function (nums) {
return uniq(nums)
})
source.pipe(dedupe)
dedupe.on('data', function (n) {
console.log(n)
})
outputs
0
1
2
3
4
5
6
7
8
9
var collect = require('collect-transform-stream')
Create a Transform stream that runs the function fn
on all incoming objects at
once, then pipes elements individually onward to the next stream in the
pipeline.
Use return result
to use synchronously; call cb(err, result)
to use
asynchronously.
With npm installed, run
$ npm install collect-transform-stream
ISC
FAQs
create a transform stream that runs a function over all collected elements
The npm package collect-transform-stream receives a total of 143 weekly downloads. As such, collect-transform-stream popularity was classified as not popular.
We found that collect-transform-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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.