Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@aws-sdk/middleware-eventstream
Advanced tools
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-eventstream/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-eventstream) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-eventstream.svg)](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.
FAQs
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-eventstream/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-eventstream) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-eventstream.svg)](https://www.npmj
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
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.