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

minipass-sized

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minipass-sized

A Minipass stream that raises an error if you get a different number of bytes than expected

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11M
decreased by-5.36%
Maintainers
1
Weekly downloads
 
Created

What is minipass-sized?

The minipass-sized npm package is a stream library that extends Minipass with support for ensuring a specific number of bytes are written to the stream. It is useful for scenarios where you need to validate the size of the stream data, such as when receiving files or data packets that must meet specific size requirements.

What are minipass-sized's main functionalities?

Size validation

This feature allows the user to set a specific size for the stream and emits an event or an error if the stream does not match the specified size. It is particularly useful for validating the integrity of data in scenarios where the exact size is critical.

const MinipassSized = require('minipass-sized');
const stream = new MinipassSized({ size: 1024 });
stream.on('size', () => console.log('Size is exactly 1024 bytes'));
stream.on('error', (err) => console.error('Error:', err.message));

Other packages similar to minipass-sized

Keywords

FAQs

Package last updated on 21 Sep 2019

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