minipass-sized
npmv2.0.0TypeScriptA Minipass stream that raises an error if you get a different number of bytes than expected
Safe to adopt
Yes — minipass-sized scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 245 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- BMaintenance: grade B, Good.
Last published 245 days ago.
- AWeight: grade A, Excellent.
Pulls in 1 transitive package, about 22 KB installed (at least — some of the tree is still being crawled).
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
ISC — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding minipass-sized to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Part of this dependency tree has not been crawled yet, so these figures are a lower bound rather than a final total.
Compatibility
- Node.js
- node >=8
- Module format
- ESM + CommonJS
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the minipass-sized README.
import { MinipassSized } from 'minipass-sized'
// or:
// const { MinipassSized } = require('minipass-sized')
// figure out how much data you expect to get
const expectedSize = +headers['content-length']
const stream = new MinipassSized({ size: expectedSize })
stream.on('error', er => {
// if it's the wrong size, then this will raise an error with
// { found: <number>, expect: <number>, code: 'EBADSIZE' }
})
response.pipe(stream)minipass-sized vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| minipass-sizedthis page | 0 | 1 | ISC | 8 months ago |
| string-length | 0 | 3 | MIT | 1 day ago |
| buffer-image-size | 0 | 1 | MIT | 1 day ago |
| array-buffer-byte-length | 0 | 1 | MIT | 1 day ago |
| set-function-length | 0 | 1 | MIT | 1 day ago |
| image-size | 0 | 1 | MIT | 1 day ago |
Dependencies
Declared by minipass-sized v2.0.0. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (1)
Dev (4)
Used by
Popular packages that depend on minipass-sized.
Relationship graph
Dependencies (left) and dependents (right) of minipass-sized.
Frequently installed together
Convert character encodings in pure javascript.
A library to create readable "multipart/form-data" streams. Can be used to submit forms and file uploads to other web applications.
An implementation of WHATWG AbortController interface.
A small fast zlib stream built on [minipass](http://npm.im/minipass) and Node.js's zlib binding.
Release history
1 release in the last two years, typically about 9 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 2.0.0latest | 8 months ago | 22 KB | ISC |
| 1.0.3 | 7 years ago | 121 KB | ISC |
| 1.0.2 | 7 years ago | 120 KB | ISC |
| 1.0.1 | 7 years ago | 120 KB | ISC |
| 1.0.0 | 7 years ago | 120 KB | ISC |
Overview
minipass-sized is an npm package that a Minipass stream that raises an error if you get a different number of bytes than expected. It has 1 known dependents in the graph. The latest version is 2.0.0, released under the ISC license.
Who should use it
Teams working in the npm ecosystem who need a Minipass stream that raises an error if you get a different number of bytes than expected and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (ISC).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use minipass-sized?
Yes — minipass-sized scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 245 days ago.
How do I install minipass-sized?
Run `npm install minipass-sized` to add minipass-sized to your npm project.
How many dependencies does minipass-sized have?
minipass-sized declares 5 direct dependencies and pulls in 1 packages in total once its runtime tree is resolved totalling about 22 KB on disk.
What license is minipass-sized released under?
minipass-sized is distributed under the ISC license.
How popular is minipass-sized?
npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on minipass-sized.
Is minipass-sized still maintained?
The most recent release of minipass-sized (v2.0.0) was published 8 months ago.
Does minipass-sized run install scripts?
No. minipass-sized does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.