
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Stream util library for nodejs.
Provide transformers and some utility class to extends node stream funcionality.
yarn add warp-pipes
import { Chunk, Map, ReadableWrap } from 'warp-pipes';
import { WritableMock } from 'stream-mock';
const opts = { objectMode: true };
const setAdult = chunk => Object.assign({}, chunk, { adult: true });
const unsetAdult = chunk => Object.assign({}, chunk, { adult: false });
// readable is a Readable stream
const sink = ReadableWrap.wrap(readable) // create a wrap around readable
.dropWhile(chunk => chunk.name === undefined, opts) // Drop while name is not defined
.filter(chunk => chunk.name.startsWith('A'), opts) // Filter names starting with `A`
.split(
[
{
stream: new Map(setAdult, opts), // pipe to Map stream applying setAdult function to each chunk
condition: chunk => chunk.age >= 18 // condition to send to setAdult mapper
},
{
stream: new Map(unsetAdult, opts), // pipe to Map stream applying unsetAdult function to each chunk
condition: chunk => chunk.age < 18 // // condition to send to unsetAdult mapper
}
],
opts
)
.pipe([
// pipe each stream into another stream
new Chunk(10, opts), // Chunk data by 10
new Chunk(5, opts) // Chunk data by 5
])
.merge() // Merge both stream in a simple one
.pipe(new WritableMock(opts)); // Pipe resulting data in to a WritableMock
sink.on('finish', () => console.log(sink.data));
warp-pipes is currently on beta stage. Here are some caveheats :
Feel free to open any bug, feature, or pull request. When making a pr, just remember to cover your code with unit tests. And please follow the code style through tslint
(but we can discuss about tslint rules).
FAQs
Nodejs stream utility
The npm package warp-pipes receives a total of 2 weekly downloads. As such, warp-pipes popularity was classified as not popular.
We found that warp-pipes 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.