Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

event-stream

Package Overview
Dependencies
Maintainers
2
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

event-stream

construct pipes of streams of events

  • 3.3.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.2M
decreased by-46.07%
Maintainers
2
Weekly downloads
 
Created

What is event-stream?

The event-stream npm package is a toolkit for working with Node.js streams. It provides a collection of tools to create, manipulate, and manage streams in a functional programming style. It is useful for handling data in a streaming fashion, which can be more efficient than loading all data into memory at once.

What are event-stream's main functionalities?

Map

Applies a function to each data event in a stream and pushes the result downstream.

es.map(function (data, callback) {
  callback(null, data.toString().toUpperCase());
})

ReadArray

Creates a readable stream from an array of items.

es.readArray(['one', 'two', 'three'])

WriteArray

Collects all data from a stream and passes it as an array to a callback function.

es.writeArray(function (err, array) {
  console.log(array);
})

Duplex

Combines a writable and readable stream into a duplex (readable and writable) stream.

es.duplex(writeStream, readStream)

Pipeline

Pipes streams together and destroys all of them if one of them closes.

es.pipeline(stream1, stream2, stream3)

Other packages similar to event-stream

FAQs

Package last updated on 05 Sep 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc