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

memorystream

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

memorystream

This is lightweight memory stream module for node.js.

  • 0.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.9M
increased by2.23%
Maintainers
1
Weekly downloads
 
Created

What is memorystream?

The memorystream npm package is a simple stream implementation that can be used to store data in memory. It is useful for testing or for small data manipulation tasks where you want to use streams but don't need to persist the data to disk or send it over a network.

What are memorystream's main functionalities?

Writable and Readable Stream

This feature allows the memorystream to act both as a writable and readable stream. Data can be written to the stream and then piped elsewhere, such as to stdout, or read directly.

const MemoryStream = require('memorystream');
const memStream = new MemoryStream();
memStream.write('Data to store in memory stream');
memStream.pipe(process.stdout);

Data Capture for Testing

Memorystream can be used to capture output in testing environments. By writing to the stream and then converting it to a string, you can easily assert the output of the stream.

const MemoryStream = require('memorystream');
const memStream = new MemoryStream();
memStream.write('Test data');
memStream.end();
console.log(memStream.toString());

Other packages similar to memorystream

Keywords

FAQs

Package last updated on 04 Mar 2015

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