Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
@aws-sdk/eventstream-marshaller
Advanced tools
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/eventstream-marshaller/latest.svg)](https://www.npmjs.com/package/@aws-sdk/eventstream-marshaller) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/eventstream-marshaller.svg)](https://www.npmj
@aws-sdk/eventstream-marshaller is a package within the AWS SDK for JavaScript that provides utilities for serializing and deserializing event streams. This is particularly useful for working with AWS services that use event streams, such as AWS Transcribe and AWS Kinesis.
Serialize Event Stream
This feature allows you to serialize an event stream. The code sample demonstrates how to create an instance of EventStreamMarshaller and use it to serialize an event.
const { EventStreamMarshaller } = require('@aws-sdk/eventstream-marshaller');
const { TextEncoder } = require('util');
const marshaller = new EventStreamMarshaller(new TextEncoder(), new TextDecoder());
const event = { headers: {}, body: Buffer.from('example data') };
const serialized = marshaller.marshall(event);
console.log(serialized);
Deserialize Event Stream
This feature allows you to deserialize an event stream. The code sample demonstrates how to create an instance of EventStreamMarshaller and use it to deserialize an event.
const { EventStreamMarshaller } = require('@aws-sdk/eventstream-marshaller');
const { TextDecoder } = require('util');
const marshaller = new EventStreamMarshaller(new TextEncoder(), new TextDecoder());
const serialized = Buffer.from('example serialized data');
const event = marshaller.unmarshall(serialized);
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. While it is more general-purpose compared to @aws-sdk/eventstream-marshaller, it can be used for similar tasks involving stream processing.
The kinesis-client-library is a package specifically designed for working with AWS Kinesis streams. It provides higher-level abstractions for consuming and processing Kinesis streams, making it more specialized compared to @aws-sdk/eventstream-marshaller, which is more low-level and general-purpose for event stream serialization and deserialization.
3.120.0 (2022-06-29)
FAQs
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/eventstream-marshaller/latest.svg)](https://www.npmjs.com/package/@aws-sdk/eventstream-marshaller) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/eventstream-marshaller.svg)](https://www.npmj
We found that @aws-sdk/eventstream-marshaller demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.