
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@aws-sdk/middleware-eventstream
Advanced tools
[](https://www.npmjs.com/package/@aws-sdk/middleware-eventstream) [](https://www.npmj
@aws-sdk/middleware-eventstream is a middleware package for the AWS SDK for JavaScript. It provides functionality to handle event streams, which are used in various AWS services to deliver real-time data. This package is essential for working with services that use event streams, such as AWS Transcribe, AWS Kinesis, and others.
Event Stream Handling
This feature allows you to handle event streams by marshalling data into the event stream format. The code sample demonstrates how to create an event stream using the EventStreamMarshaller.
const { EventStreamMarshaller } = require('@aws-sdk/middleware-eventstream');
const marshaller = new EventStreamMarshaller();
const eventStream = marshaller.marshall({
headers: {},
body: Buffer.from('example event data')
});
console.log(eventStream);
Event Stream Unmarshalling
This feature allows you to unmarshall event streams back into their original data format. The code sample demonstrates how to unmarshall an event stream using the EventStreamMarshaller.
const { EventStreamMarshaller } = require('@aws-sdk/middleware-eventstream');
const marshaller = new EventStreamMarshaller();
const eventStream = Buffer.from('example event stream');
const event = marshaller.unmarshall(eventStream);
console.log(event);
The event-stream package is a toolkit for working with streams in Node.js. It provides a variety of utilities for creating and manipulating streams, including event streams. Compared to @aws-sdk/middleware-eventstream, event-stream is more general-purpose and not specifically tailored for AWS services.
The kinesis-client-library is a package for working with Amazon Kinesis streams. It provides high-level abstractions for consuming and processing data from Kinesis streams. While it focuses specifically on Kinesis, it offers similar event stream handling capabilities as @aws-sdk/middleware-eventstream.
3.208.0 (2022-11-10)
FAQs
[](https://www.npmjs.com/package/@aws-sdk/middleware-eventstream) [](https://www.npmj
The npm package @aws-sdk/middleware-eventstream receives a total of 267,188 weekly downloads. As such, @aws-sdk/middleware-eventstream popularity was classified as popular.
We found that @aws-sdk/middleware-eventstream demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.