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

stream-buffers

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-buffers

Buffer-backed Streams for reading and writing.

  • 0.2.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.2M
increased by4.51%
Maintainers
1
Weekly downloads
 
Created

What is stream-buffers?

The stream-buffers npm package provides a way to use in-memory storage as a stream. This can be useful when you want to work with streams without actually reading from or writing to the file system. It allows you to use buffers as readable and writable streams.

What are stream-buffers's main functionalities?

WritableStreamBuffer

This feature allows you to create a writable stream that you can write data to. The data is stored in memory and can be retrieved as a Buffer.

const streamBuffers = require('stream-buffers');
const myWritableStreamBuffer = new streamBuffers.WritableStreamBuffer();
myWritableStreamBuffer.write('Some data');
const data = myWritableStreamBuffer.getContents();

ReadableStreamBuffer

This feature allows you to create a readable stream that you can push data into. The data can then be read from the stream as if it were being read from a file or other data source.

const streamBuffers = require('stream-buffers');
const myReadableStreamBuffer = new streamBuffers.ReadableStreamBuffer();
myReadableStreamBuffer.put('Some data');
myReadableStreamBuffer.on('data', (dataChunk) => {
  console.log(dataChunk.toString());
});

Other packages similar to stream-buffers

Keywords

FAQs

Package last updated on 08 Sep 2014

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