Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
An expressive streaming utility for node, inspired by Lo-Dash, Async, and event-stream. Ice-stream goal is to allow for complex processing of streaming data.
An expressive streaming utility for node, inspired by Lo-Dash, Async, and event-stream.
Ice-Stream aims to make stream processing as easy as the ubiquitous mentioned above make processing arrays and objects.
Stream processing is basically pumping data through a number of operations, piece by piece. Using streams is especially useful when:
In some cases it is useful to think about and operate on a stream as a continual flow of data, and sometimes it is better to think about it as a segmented, chunk by chunk flow. Ice-Stream's methods do both, depending on the operation.
First, to include Ice-Stream
var is = require('ice-stream');
Using the static methods results in a typical Node Stream
// Stream from a file, through a lowercaser, to an output file
is.toLower( fs.createReadStream('file.txt') ).pipe( fs.createWriteStream('file-low.txt') );
Passing a Stream
to the constructor generates a wrapped stream, which can be chained
// Parse out unique keywords from the file and output them to stdout
is( fs.createReadStream('file.txt') ).split(' ').toLower().unique().without('ruby', 'python').join('\n').out();
The Ice-Stream variable can be used as a namespace to access the stream methods, as a function to wrap basic Node streams, and as a constructor to create streams for data.
Examples
// Wrap a basic Stream
var wstream1 = is( fs.createReadStream('file.txt') );
// Create a text stream
var wstream2 = is('stream this data');
// The above result is wrapped so we can immediately chain it
wstream2.split(' ').join('\n').out();
// Create a stream from an array
is(['stream', 'this', 'data']).join('\n').out();
// Create a non-text stream from an array
is([1, 4, 6, 2, 91]).map(function(num) {
return num*2;
}).join('\n').out();
Arguments
Arguments
\n
.Arguments
Arguments
Arguments
Arguments
Arguments
Arguments
err
callback parameter.Arguments
FAQs
An expressive streaming utility for node, inspired by Lo-Dash, Async, and event-stream. Ice-stream goal is to allow for complex processing of streaming data.
We found that ice-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
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.