
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
A versatile stream filter for Node.js.
This package is not affliated with Tim-Smart’s filter.
$ npm install filter2
var filter = require('filter2')
fs.createReadStream('./foo.txt')
.pipe(filter())
fs.createReadStream('./foo.txt')
.pipe(filter.head(5))
fs.createReadStream('./foo.txt')
.pipe(filter.tail(5))
fs.createReadStream('./foo.txt')
.pipe(filter(function(chunk, encoding, next) {
// returns true to make chunks flow downstream
return /bar/.test(chunk, encoding, next)
}))
Filter function get the same arguments as through2.
Usually filter
only makes sense when using after filter.split()
.
function MySet(n) {
this._array = Array(n)
}
MySet.prototype.push = function(thing) {
// filter input as you wish
this._array.push(thing)
}
MySet.prototype.forEach = function() {
Array.prototype.forEach.apply(this._array, arguments)
}
var mySet = new MySet(4)
fs.createReadStream('./foo.txt')
.pipe(filter.some(mySet))
// each chunk is pushed into mySet
// and when upstream drains, it
// returns a set of chunks that mySet.forEach returns
This is just an alias of Matteo Collina's split2. Please refers to split2 README for more details.
fs.createReadStream('./foo.txt')
.pipe(filter.split())
// split and rearrange chunks by line break
Copyright (c) 2015 Jingwei "John" Liu
Licensed under the MIT license.
FAQs
A versatile stream filter for node.js
The npm package filter2 receives a total of 3 weekly downloads. As such, filter2 popularity was classified as not popular.
We found that filter2 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.